- Fix: Tag-length lint check now only triggers on calls to
Timber
'stag
method. Previously it would match anytag
method and flag arguments longer than 23 characters.
- New: Add method for retreiving the number of installed trees.
- New: Consumer ProGuard rule automatically suppresses a warning for the use
@NonNls
on the 'message' argument for logging method. The warning was only for users running ProGuard and can safely be ignored. - New: Static
log
methods which accept a priority as a first argument makes dynamic logging at different levels easier to support. - Fix: Replace internal use of
Log.getStackTraceString
with our own implementation. This ensures thatUnknownHostException
errors are logged, which previously were suppressed. - Fix: 'BinaryOperationInTimber' lint rule now only triggers for string concatenation.
- Fix: TimberArgTypes lint rule now allows booleans and numbers in '%s' format markers.
- Fix: Lint rules now support running on Java 7 VMs.
- New: Library is now an .aar! This means the lint rules are automatically applied to consuming projects.
- New:
Tree.forest()
returns an immutable copy of all planted trees. - Fix: Ensure thread safety when logging and adding or removing trees concurrently.
- New:
Tree.isLoggable
method allows a tree to determine whether a statement should be logged based on its priority. Defaults to logging all levels.
- Fix: Strip multiple anonymous class markers (e.g.,
$1$2
) from class names whenDebugTree
is creating an inferred tag.
- Fix: String formatting is now always applied when arguments are present. Previously it would only trigger when an exception was included.
- New:
Tree
andDebugTree
APIs are much more extensible requiring only a single method to override. - New:
DebugTree
exposescreateStackElementTag
method for overriding to customize the reflection-based tag creation (for example, such as to add a line number). - WTF: Support for
wtf
log level. HollowTree
has been removed as it is no longer needed. Just extendTree
.TaggedTree
has been removed and its functionality folded intoTree
. AllTree
instances will receive any tags specified by a call totag
.- Fix: Multiple planted
DebugTree
s now each correctly received tags set from a call totag
.
- Fix: Switch method of getting calling class to be consistent across API levels.
- New:
DebugTree
subclasses can now overridelogMessage
for access to the priority, tag, and entire message for every log. - Fix: Prevent overriding
Tree
andTaggedTree
methods onDebugTree
.
- New:
DebugTree
subclasses can now overridecreateTag()
to specify log tags.nextTag()
is also accessible for querying if an explicit tag was set.
- Fix: Properly split lines which contain both newlines and are over 4000 characters.
- Explicitly forbid
null
tree instances.
- New:
Timber.asTree()
exposes functionality as aTree
instance rather than static methods.
- Eliminate heap allocation when dispatching log calls.
- Fix: Calls with no message but a
Throwable
are now correctly logged.
- New:
uproot
anduprootAll
methods allow removing trees.
- New: Messages longer than 4000 characters will be split into multiple lines.
- Fix: Include debug level in previous fix which avoids formatting messages with no arguments.
- Fix: Do not attempt to format log messages which do not have arguments.
- New: verbose log level added (
v()
). - New:
timber-lint
module adds lint check to ensure you are callingTimber
and notLog
. - Fix: Specifying custom tags is now thread-safe.
- New:
tag
method allows specifying custom one-time tag. Redux!
- Logging API is now exposed as static methods on
Timber
. Behavior is added by installingTree
instances for logging.
- New:
tag
method allows specifying custom one-time tag. - Fix: Exception-containing methods now log at the correct level.
Initial cut. (Get it?)