sl 2.0.0
sl: ^2.0.0 copied to clipboard
A structured logging library.
2.0.0 #
Breaking changes #
- Removed
middlewaresfromLogTextHandlerandLogJsonHandler. Wrap the handler inLogMiddlewareHandlerinstead. LogTextHandler.sinkandLogJsonHandler.sinkare nowStringSinkinstead ofIOSink.
Features #
- Added
LogMiddlewareHandlerfor applying middlewares to any handler. - Added
Logger.defaultLogger,Logger.setDefaultandLogger.named. - Added
LogMemoryHandlerfor keeping recent records in memory.
Fixes #
LogTextHandlerno longer drops attributes matchingscopeKeyinside groups.LogJsonHandlerno longer lets attributes override the built-intime,level,msgandsourcefields.LogJsonHandleromits empty groups.
1.2.0 #
- Added
Logger.enabledmethod to check if logging is enabled for a given level and context.
1.1.0 #
- Improved formatting and readability of multiline error logs and stack traces in
LogTextHandler.
1.0.0 #
- Added automatic
Context.currentpropagation inLogger.logwhen no explicitctxparameter is passed.
0.0.5 #
- Added
withGroup
0.0.4 #
- Added
addSourceoption toLogJsonHandlerandLogTextHandlerto include caller location in logs. - Added
LogMultiHandlerto route logs to multiple handlers.
0.0.3 #
- Introduced context-aware logging using
ctx/attrsnamed parameters andmiddlewaressupport.
0.0.2 #
- Switched context logger key from
StringtoObjectto prevent name collisions.
0.0.1 #
- Initial version.