1.3.0
- Support interceptors when logging, see
Interceptor
andLogNotification.Builder.addInterceptor(Interceptor)
- Add
NeverBackupStrategy
for file logging - Add blacklist and whitelist tags filter, see
BlacklistTagsFilterInterceptor
andWhitelistTagsFilterInterceptor
. Besides, you can easily define a filter interceptor extendingAbstractFilterInterceptor
- Use
Flattener
instead of, andLogFlattener
DefaultFlattener
instead ofDefaultLogFlattener
- Add
PatternFlattener
andClassicFlattener
-
PatternFlattener
flatten the log using the format specified by pattern
Supported parameters:Parameter Represents {d} Date in default date format "yyyy-MM-dd HH:mm:ss.SSS" {d format} Date in specific date format {l} Short name of log level. e.g: V/D/I {L} Long name of log level. e.g: VERBOSE/DEBUG/INFO {t} Tag of log {m} Message of log Imagine there is a log, with
LogLevel.DEBUG
level,my_tag
tag andSimple message
message, the flattened log would be as below.Pattern Flattened log {d} {l}/{t}: {m} 2016-11-30 13:00:00.000 D/my_tag: Simple message {d yyyy-MM-dd HH:mm:ss.SSS} {l}/{t}: {m} 2016-11-30 13:00:00.000 D/my_tag: Simple message {d yyyy/MM/dd HH:mm:ss} {l}|{t}: {m} 2016/11/30 13:00:00 D|my_tag: Simple message {d yy/MM/dd HH:mm:ss} {l}|{t}: {m} 16/11/30 13:00:00 D|my_tag: Simple message {d MM/dd HH:mm} {l}-{t}-{m} 11/30 13:00 D-my_tag-Simple message -
ClassicFlattener
flatten the log using the pattern{d} {l}/{t}: {m}
-
- Print logs to file more efficiently (#8)
- Logger-based log level control, see
LogNotification.Builder.logLevel(int logLevel)
- Refactor initialization methods of
XLog
- Added
XLog.init()
XLog.init(LogConfiguration)
XLog.init(Printer...)
XLog.init(LogConfiguration, Printer...)
- Deprecated
init(int, LogConfiguration)
init(int, LogConfiguration, Printer...)
- Added
- Use
ConsolePrinter
instead ofSystemPrinter