logger
Small, easy to use and extensible logger which prints beautiful logs.
2.7.0
2.6M downloads/mo
#230 most downloaded on pub.dev
SourceHorizon/logger
What this package is like to depend on
Last release 5 months ago
15 Mar 2026
Release timing varies
gaps range from 3 weeks to 7 months
Most releases are documented
notes for 34 of 38 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
40 releases · first in 2018
2 releases in the last 12 months
see the full history below
Release timeline
40 releases · Jan 2018 to Mar 2026Releases
latest 40-
2.7.015 Mar 2026Release notes
Open source →- Use
clockfor getting default log event time. Thanks to @alverone (#112).
- Use
-
2.6.205 Oct 2025Release notes
Open source →What's Changed
- PrettyPrinter: Fixed the showing of internal
package:loggerlog lines in the stack trace on Flutter/Dart Web.
Closes #102. - Lowered the
metapackage version requirement.
Full Changelog: v2.6.1...v2.6.2
Release notes
Open source →- PrettyPrinter: Fixed the showing of internal
package:loggerlog lines in the stack trace on Flutter/Dart Web. Closes #102. - Lowered the
metapackage version requirement.
- PrettyPrinter: Fixed the showing of internal
-
2.6.121 Jul 2025Release notes
Open source →- AdvancedFileOutput: Fixed race condition while flushing the buffer (
StateError). Closes #99, thanks to @sap1tz.
- AdvancedFileOutput: Fixed race condition while flushing the buffer (
-
2.6.023 Jun 2025Release notes
Open source →What's Changed
- Added log level comparison operators by @busslina in #90
- AdvancedFileOutput: Added
fileHeaderandfileFooteroptions. Closes #97.
New Contributors
Full Changelog: v2.5.0...v2.6.0
-
2.5.016 Nov 2024Release notes
Open source →What's Changed
- AdvancedFileOutput: Added support for custom
fileUpdateDuration. Thanks to @shlowdy (#86). - README: Fixed outdated LogOutput documentation.
New Contributors
Full Changelog: v2.4.0...v2.5.0
Release notes
Open source →- AdvancedFileOutput: Added support for custom
fileUpdateDuration. Thanks to @shlowdy (#86). - README: Fixed outdated LogOutput documentation.
- AdvancedFileOutput: Added support for custom
-
2.4.015 Jul 2024Release notes
Open source →What's Changed
- Added pub.dev
topics. Thanks to @jonasfj (#74). - PrettyPrinter: Added
dateTimeFormatoption (backwards-compatible withprintTime). Fixes #80.
New Contributors
Full Changelog: v2.3.0...v2.4.0
- Added pub.dev
-
2.3.012 May 2024Release notes
Open source →- AdvancedFileOutput: Added file deletion option. Thanks to @lomby92 (#71).
-
2.2.023 Mar 2024Release notes
Open source →- Added AdvancedFileOutput. Thanks to @pyciko (#65).
- Added missing acknowledgments in README.
-
2.1.003 Mar 2024Release notes
Open source →What's Changed
- Improved README explanation about debug mode. Thanks to @gkuga (#57).
- Added web safe export. Fixes #58.
- Added
logger.initto optionally await anyasyncinit()methods. Fixes #61.
New Contributors
Full Changelog: v2.0.2+1...v2.1.0
-
2.0.203 Sep 2023Release notes
Open source →- Moved the default log level assignment to prevent weird lazy initialization bugs. Mitigates #38.
-
2.0.2+123 Sep 2023Release notes
Open source →What's Changed
- Meta update: Updated repository links to https://github.com/SourceHorizon/logger.
Full Changelog: v2.0.2...v2.0.2+1
Release notes
Open source →- Meta update: Updated repository links to https://github.com/SourceHorizon/logger.
-
2.0.126 Jul 2023 -
2.0.025 Jul 2023Release notes
Open source →- Fixed supported platforms list.
- Removed reference to outdated
logger_flutterproject. Thanks to @yangsfang (#32). - Added override capability for logger defaults. Thanks to @yangsfang (#34).
Level.verbose,Level.wtfandLevel.nothinghave been deprecated and are replaced byLevel.trace,Level.fatalandLevel.off. AdditionallyLevel.allhas been added.- PrettyPrinter: Added
levelColorsandlevelEmojisas constructor parameter.
Breaking changes
-
logsignature has been changed to closer match dart's developerlogfunction and allow for future optional parameters.Additionally,
timehas 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:
-
initandclosemethods ofLogFilter,LogOutputandLogPrinterare now async along withLogger.close(). (Fixes FileOutput) -
LogListeners are now called on every LogEvent independent of the filter.
-
PrettyPrinter:
includeBoxis now private. -
PrettyPrinter:
errorMethodCountis now only considered if an error has been provided. OtherwisemethodCountis used. -
PrettyPrinter: Static
levelColorsandlevelEmojishave been renamed todefaultLevelColorsanddefaultLevelEmojisand 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.006 Jun 2023Release notes
Open source →- Bumped upper SDK constraint to
<4.0.0. - Added
excludePathsto PrettyPrinter. Thanks to @Stitch-Taotao (#13). - Removed background color for
Level.errorandLevel.wtfto improve readability. - Improved PrettyPrinter documentation.
- Corrected README notice about ANSI colors.
- Bumped upper SDK constraint to
-
1.3.012 Mar 2023 -
1.2.223 Feb 2023Release notes
Open source →- Fixed conditional LogOutput export. Credits to @ChristopheOosterlynck #4.
-
1.2.123 Feb 2023 -
1.2.022 Feb 2023Release notes
Open source →- Added origin LogEvent to OutputEvent. Addresses #133.
- Re-added LogListener and OutputListener (Should restore compatibility with logger_flutter).
- Replaced pedantic with lints.
-
1.1.026 Aug 2021Release notes
Open source →- 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.018 Mar 2021 -
1.0.0-nullsafety.015 Dec 2020 pre-release -
0.9.429 Sep 2020 -
0.9.324 Sep 2020Release notes
Open source →- 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.
- Add
-
0.9.227 Jul 2020Release notes
Open source →- Add
PrefixPrinter. Credits to @tkutcher. - Add
HybridPrinter. Credits to @tkutcher.
- Add
-
0.9.122 Apr 2020Release notes
Open source →- Fix logging output for Flutter Web. Credits to @nateshmbhat and @Cocotus.
-
0.8.314 Jan 2020 -
0.8.231 Dec 2019 -
0.8.124 Dec 2019 -
0.8.019 Dec 2019Release notes
Open source →- Fix SimplePrinter showTime #12
- Remove buffer field
- Update library structure (thanks @marcgraub!)
-
0.7.005 Jul 2019Release notes
Open source →- Added
ProductionFilter,FileOutput,MemoryOutput,SimplePrinter - Breaking: Changed
LogFilter,LogPrinterandLogOutput
- Added
-
0.7.0+105 Jul 2019 -
0.7.0+205 Jul 2019 -
0.6.005 Jun 2019Release notes
Open source →- Added option to output timestamp
- Added option to disable color
- Added
LogOutput - Behaviour change of
LogPrinter - Remove dependency
-
0.5.004 Jun 2019 -
0.4.004 Jun 2019 -
0.3.131 Oct 2018Nothing published for this version
-
0.3.031 Oct 2018Nothing published for this version
-
0.2.006 Jul 2018Nothing published for this version
-
0.1.029 Jan 2018Nothing published for this version
-
0.1.0-alpha.122 Jan 2018 pre-releaseNothing published for this version