public static final class TimberTestRule.Rules
extends java.lang.Object
TimberTestRule's internal Timber tree must
adhere to when intercepting log messages.
The types of rules applied are:
| Modifier and Type | Method and Description |
|---|---|
TimberTestRule |
build()
Builds the JUnit test rule based on the defined rules.
|
TimberTestRule.Rules |
minPriority(int minPriority)
Defines what the lowest level of log type that should be logged.
|
TimberTestRule.Rules |
onlyLogWhenTestFails(boolean onlyLogWhenTestFails)
Defines whether the logs are only output if the unit test fails.
|
TimberTestRule.Rules |
showThread(boolean showThread)
Defines whether the Thread ID and name should be logged
|
TimberTestRule.Rules |
showTimestamp(boolean showTimestamp)
Defines whether the timestamp should be logged
|
public TimberTestRule.Rules minPriority(int minPriority)
This can be:
Log.VERBOSELog.DEBUGLog.INFOLog.WARNLog.ERRORminPriority - the Android log priority.TimberTestRule.Rulespublic TimberTestRule.Rules showThread(boolean showThread)
showThread - whether the thread details are shown.TimberTestRule.Rulespublic TimberTestRule.Rules showTimestamp(boolean showTimestamp)
showTimestamp - whether the timestamp is shown.TimberTestRule.Rulespublic TimberTestRule.Rules onlyLogWhenTestFails(boolean onlyLogWhenTestFails)
onlyLogWhenTestFails - whether the logs are only output when a test fails.TimberTestRule.Rulespublic TimberTestRule build()