logger 2.5.0 logger: ^2.5.0 copied to clipboard
Small, easy to use and extensible logger which prints beautiful logs.
2.5.0 #
- AdvancedFileOutput: Added support for custom
fileUpdateDuration
. Thanks to @shlowdy (#86). - README: Fixed outdated LogOutput documentation.
2.4.0 #
2.1.0 #
2.0.2+1 #
- Meta update: Updated repository links to https://github.com/SourceHorizon/logger.
2.0.2 #
- Moved the default log level assignment to prevent weird lazy initialization bugs. Mitigates #38.
2.0.1 #
- Updated README to reflect v2.0.0 log signature change.
2.0.0 #
- Fixed supported platforms list.
- Removed reference to outdated
logger_flutter
project. Thanks to @yangsfang (#32). - Added override capability for logger defaults. Thanks to @yangsfang (#34).
Level.verbose
,Level.wtf
andLevel.nothing
have been deprecated and are replaced byLevel.trace
,Level.fatal
andLevel.off
. AdditionallyLevel.all
has been added.- PrettyPrinter: Added
levelColors
andlevelEmojis
as constructor parameter.
Breaking changes #
-
log
signature has been changed to closer match dart's developerlog
function and allow for future optional parameters.Additionally,
time
has been added as an optional named parameter to support providing custom timestamps for LogEvents instead ofDateTime.now()
.Migration:
- Before:
logger.e("An error occurred!", error, stackTrace);
- After:
logger.e("An error occurred!", error: error, stackTrace: stackTrace);
- Before:
-
init
andclose
methods ofLogFilter
,LogOutput
andLogPrinter
are now async along withLogger.close()
. (Fixes FileOutput) -
LogListeners are now called on every LogEvent independent of the filter.
-
PrettyPrinter:
includeBox
is now private. -
PrettyPrinter:
errorMethodCount
is now only considered if an error has been provided. OtherwisemethodCount
is used. -
PrettyPrinter: Static
levelColors
andlevelEmojis
have been renamed todefaultLevelColors
anddefaultLevelEmojis
and are used as fallback for their respective constructor parameters. -
Levels are now sorted by their respective value instead of the enum index (Order didn't change).
1.4.0 #
- Bumped upper SDK constraint to
<4.0.0
. - Added
excludePaths
to PrettyPrinter. Thanks to @Stitch-Taotao (#13). - Removed background color for
Level.error
andLevel.wtf
to improve readability. - Improved PrettyPrinter documentation.
- Corrected README notice about ANSI colors.
1.3.0 #
1.2.0 #
- Added origin LogEvent to OutputEvent. Addresses #133.
- Re-added LogListener and OutputListener (Should restore compatibility with logger_flutter).
- Replaced pedantic with lints.
1.1.0 #
- Enhance boxing control with PrettyPrinter. Credits to @timmaffett
- Add trailing new line to FileOutput. Credits to @narumishi
- Add functions as a log message. Credits to @smotastic
1.0.0 #
- Stable nullsafety
1.0.0-nullsafety.0 #
- Convert to nullsafety. Credits to @DevNico
0.9.4 #
- Remove broken platform detection.
0.9.3 #
- Add
MultiOutput
. Credits to @gmpassos. - Handle browser Dart stacktraces in PrettyPrinter. Credits to @gmpassos.
- Add platform detection. Credits to @gmpassos.
- Catch output exceptions. Credits to @gmpassos.
- Several documentation fixes. Credits to @gmpassos.
0.9.2 #
- Add
PrefixPrinter
. Credits to @tkutcher. - Add
HybridPrinter
. Credits to @tkutcher.
0.9.1 #
- Fix logging output for Flutter Web. Credits to @nateshmbhat and @Cocotus.
0.9.0 #
- Remove
OutputCallback
andLogCallback
- Rename
SimplePrinter
s argumentuseColor
tocolors
- Rename
DebugFilter
toDevelopmentFilter
0.8.3 #
- Add LogfmtPrinter
- Add colored output to SimplePrinter
0.8.2 #
- Add StreamOutput
0.8.1 #
- Deprecate callbacks
0.8.0 #
- Fix SimplePrinter showTime #12
- Remove buffer field
- Update library structure (thanks @marcgraub!)
0.7.0+1 #
- Added
ProductionFilter
,FileOutput
,MemoryOutput
,SimplePrinter
- Breaking: Changed
LogFilter
,LogPrinter
andLogOutput
0.6.0 #
- Added option to output timestamp
- Added option to disable color
- Added
LogOutput
- Behaviour change of
LogPrinter
- Remove dependency
0.5.0 #
- Added emojis
LogFilter
is a class now
0.4.0 #
- First version of the new logger