fern
Simple, efficient logging
0.7.1
45M downloads/mo
#1313 most downloaded on crates.io
daboross/fern
What this package is like to depend on
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 2.1 years
Nearly every release is documented
notes for 40 of 40 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
40 releases · first in 2014
0 releases in the last 12 months
see the full history below
Release timeline
40 releases · Dec 2014 to Dec 2024Releases
latest 40-
0.7.115 Dec 2024 -
0.7.021 Oct 2024Release notes
Open source →- Upgrade
coloredto version 2. This is a breaking change due tocoloredbeing exposed in the public API offern. (thanks [@faern] for doing the boilerplate here!) - Remove most of the unsoundness warning, and update it to reflect fern 0.7.0 fixing the issue.
- Upgrade
-
0.6.223 Mar 2023Release notes
Open source →- Add security warning for "colored" feature when using a global allocator to doc homepage and README.md. See fern-0.6.2 README.md
- Change examples to use
env_logger-style formatting - Improve main documentation example explanation
- Misc. style improvements (clippy lint fixes which have no functional change)
-
0.6.115 Apr 2022Release notes
Open source →- Document reopen feature requiring a feature flag (thanks [@Palladinium]!)
- Fix typo in colors documentation (thanks [@sourcefrog]!)
- Add support for reopen v1 under reopen-1 feature (thanks [@vorner]!)
- Add syslog v6 support under syslog-6 feature (thanks folk at [@EasyPost]!)
- Fix README badges
-
0.6.009 Mar 2020 -
0.5.923 Oct 2019Release notes
Open source →- Add a rotating date-based file logger (thanks [@tanujitghosh]!)
- Add a file logger which supports reopening files on SIGHUP via the [reopen] crate (thanks [@itkovian]!)
- Ensure Windows console colors are enabled whenever a ColoredLevelConfig is created on Windows (thanks [@Songtronix]!)
- Change minimum rust version from 1.16 to 1.32, as it had already been effectively changed by a patch update in one of our dependencies (cfg-if)
- Update crate to Rust 2018 edition (thanks [@tymcauley]!)
-
0.5.826 Mar 2019Release notes
Open source →- Change
syslogfeature to no longer re-export anything on Windows. Previously, usingsyslogon windows would simply fail to compile. (thanks [@17dec]!) - Fix
log_enabled!macro only checking dispatch at surface and not at sub-levels. Actually logging still only does a shallow check, but nowlog_enabled!()should be actually accurate.
- Change
-
0.5.711 Nov 2018Release notes
Open source →- Fix colored log level display to honor formatting flags such as "{:>5}" (thanks [@ExpHP]!)
-
0.5.620 Jun 2018Release notes
Open source →- Add another fuller example for colored logging (thanks [@digitalatigid]!)
- Add support for syslog version 4.0.0 under feature flag 'syslog-4'.
- Does not remove syslog-3 support
- Includes support for RFC5424 formatting, but requires manually
transforming the log record into the key/value pairs syslog
expects.
- Add shorthand for calling an arbitrary function as a logging backend
Release notes
Open source →- Add another fuller example for colored logging (thanks [@digitalatigid]!)
- Add support for syslog version 4.0.0 under feature flag
syslog-4.- Does not remove syslog-3 support
- Includes support for RFC5424 formatting, but requires manually transforming the log record into the key/value pairs syslog expects.
- Add shorthand for calling an arbitrary function as a logging backend
-
0.5.525 Mar 2018Release notes
Open source →- Add a log handler for logging into an arbitrary
Writeobject. (thanks [@vorner]!)
- Add a log handler for logging into an arbitrary
-
0.5.418 Feb 2018Release notes
Open source →- Add a log handler which panics on all messages. This can be used in test configurations to turn warning or error messages into hard errors.
- meta: add test coverage reporting via tarpaulin and coveralls
-
0.5.305 Feb 2018Release notes
Open source →- Add support for
Display::fmtimplementations which call the global logger via a 'meta-logging-in-format' flag. (thanks [@jakunar]!)- This is disabled by default, see 'meta' module for more info.
- Add support for
-
0.5.203 Jan 2018Release notes
Open source →- Re-add compatibility for rust versions 1.16.0+, and add CI testing with rustc 1.16.0 to ensure this is kept in the future.
- Add some more general documentation updates and clarity increases.
- Add a CHANGELOG.md which mirrors git tag releases.
- Update documentation links to point to docs.rs rather than custom hosted documentation.
- Fix ColoredLevelConfig::default being an inherent method rather than an implementation of the Default trait.
- Add direct support for the syslog crate under the "syslog-3"
feature flag.
- Add a module worth of documentation for using fern with syslog.
-
0.5.126 Dec 2017Release notes
Open source →- Re-add support for colored log levels with the 'colored' feature
- Support for this was accidentally dropped in 0.5.0.
- Fix the ability to run tests on windows, and refactor integration tests for developer clarity
- Update documentation for clarity
Short list of changes in 0.5.0:
- Updated from log 0.3 to log 0.4. Both are interoperable, but using log 0.4 provides a much cleaner log interface for fern to use internally
- Removed fern::FernLog.
- Renamed fern::color::ColoredLogLevelConfig to ColoredLevelConfig
- Greatly simplified testing
- Re-add support for colored log levels with the 'colored' feature
-
0.5.026 Dec 2017Release notes
Open source →- Update from log 0.3 to log 0.4. Both log versions are interoperable,
but line numbers from libraries using 0.4 won't show up in binaries
with recievers using log 0.4.
- To clarify: both fern 0.4 and 0.5 will work perfectly with all libraries, but line numbers will always be 0 if you use fern 0.4 and log 0.4.
- Remove fern::FernLog. With log 0.4, log records can be constructed directly, and fern loggers can now recieve just a record rather than a record and the formatted display string.
- Notable changes in the log crate: log::LogLevel is renamed to log::Level, and log::LogLevelFilter is renamed to log::LevelFilter.
- fern::color::ColoredLogLevelConfig has been renamed to fern::color::ColoredLevelConfig to match log crate renamings.
- fern tests have been greatly simplified with the new support for creating log records manually. it's now possible to just run "cargo test" and test all of fern's functionality.
- Update from log 0.3 to log 0.4. Both log versions are interoperable,
but line numbers from libraries using 0.4 won't show up in binaries
with recievers using log 0.4.
-
0.4.423 Dec 2017Release notes
Open source →- Add support for coloring log levels in Unix terminals using the
'colored' crate (thanks [@nihiluis]!)
- This is enabled via the 'colored' feature, and adds a fern::color module.
- Add support for coloring log levels in Unix terminals using the
'colored' crate (thanks [@nihiluis]!)
-
0.4.320 Sep 2017Release notes
Open source →- Add support for sending to an std::sync::mpsc::Sender as a log output (thanks [@gingerDevilish]!)
-
0.4.220 Aug 2017 -
0.4.120 Aug 2017Release notes
Open source →- Lots of documentation tweaks and reworking
- Add CONTRIBUTING file and update README to invite new contributors
- Improve example application to be more realistic
- A few small internal improvements, mostly code cleanup here
-
0.4.009 May 2017Release notes
Open source →-
Rework API surface to be builder-based for simpler configuration
- Rename DispatchConfig to Dispatch, OutputConfig to Output and FernLogger to FernLog
-
Rework inner log structure for more efficiency
- Different outputs are now stored in an
enumrather than every sublogger being a Box<FernLog> with dynamic dispatch - Remove LogError; handle errors within individual loggers now - and only within loggers which actually need it
- Remove unnecessary wrapping of streams with an Arc (now just uses Mutex for File streams)
- Remove unnecessary wrapping of Stdout and Stderr streams with a Mutex, when they are already synchronized
- Pass around just &fmt::Arguments + &log::LogRecord instead of passing each individual LogRecord part
- Different outputs are now stored in an
-
Move opening of files and stdout/stderr from configuration "building" to configuring
- Instead of taking OpenOptions, log configuration now just takes an already-opened std::io::File object
- fern::InitError is now a convenience API, and is never returned from any fern APIs
-
Redo formatting to work without allocation - formatting closures now finish with a callback rather than returning a value
-
Update examples to use
chronoinstead of thetimecrate- This removes another extra allocation - chrono can format time directly to a writer, without allocating intermediate the result to a String
-
Add much more documentation: almost every builder method has a full example, and all features should be thoroughly explained
-
Add appveyor and travis-ci badges to README and Cargo.toml
-
-
0.3.506 May 2015Release notes
Open source →- Build changes to .travis.yml
- Add html_root_url doc attribute
- Add file_with_line_sep and file_with_options_and_line_sep configuration construction options to allow specifying a line separator other than the default '\n'
-
0.3.417 Apr 2015Release notes
Open source →- Update for rustc version e9080ec39 (1.0.0-beta.2)
- Update to use no_test to ignore doc tests, rather than ignore
- Remove all stability attributes on public types
- Add rust version matrix for testing on travis, to test on beta as well as nightly builds
- Update for rustc version e9080ec39 (1.0.0-beta.2)
-
0.3.304 Apr 2015Release notes
Open source →- Update for rustc version 9854143cb (1.0.0-beta)
- Derive Clone for all types deriving Copy
- Update docs a bit for that switch to
timecrate
- Switch to time crate instead of chrono for tests, as chrono hasn't updated for rustc 1.0.0-beta yet.
- Instead of implementing a sudo-time crate as a workaround for https://github.com/rust-lang/cargo/issues/1474, just disable the doc test, and copy the code to a separate file in tests/
- Update for rustc version 9854143cb (1.0.0-beta)
-
0.3.203 Apr 2015Release notes
Open source →- Update to rustc version 2e3b0c051
- Add a workaround for https://github.com/rust-lang/cargo/issues/1474 in doc tests
- Implement From for errors instead of FromError
- Remove now unrequired feature gate
- Implement error::Error for error types
- Update to rustc version 2e3b0c051
-
0.3.126 Mar 2015 -
0.3.025 Mar 2015Release notes
Open source →- Updates to rustc version 123a754cb
- Updates to log version 0.3.0
- Reworks fern::OutputConfig to be a struct with functions to
construct configurations, rather than an enum with variants for each
configuration.
- This is a breaking change, as all constructors on fern::OutputConfig have been renamed from UpperCase to lower_case.
- This also now allows fern::OutputConfig to be constructed with
anything which implements
AsRef<path::Path>.- For example,
fern::OutputConfig::file("some-file.log")works, without having to construct a Path or PathBuf manually.
- For example,
-
0.2.119 Mar 2015 -
0.2.009 Mar 2015Release notes
Open source →This version reworks the public API in order to turn fern into a backend to the
logcrate.API Changes:
- Remove the
localmodule, as thelogcrate now handles storing a global logger. - fern::Logger must now be Sync + Send
- BoxedLogger and ArcLogger typedefs are removed, due to writing
+ Sync + Sendno longer being required - Now everything just uses Box<Logger>
- Level is removed, in favor of using log::LogLevel and log::LogLevelFilter
- LoggerConfig is renamed into DispatchConfig
- Rename
ErrortoLogError- Implement
fmt::DisplayforLogError
- Implement
- A new
Formattertype is added for formatting closures. It also now takes a &log::LogLocation parameters as well. - OutputConfig::Parent is renamed into OutputConfig::Child, this seems to make more sense, given that you can have any number of children
- Logger::log() now takes (&str, &log::LogLevel, &log::LogLocation) instead of (&fern::Level, &str)
- Add an
IntoLogtrait which DispatchConfig and OutputConfig implement (instead of havinginto_logger()on each of them.- Add an
into_log()method to the IntoLog trait that turns a log configuration into alog::Log(as apposed tofern::Logger) - Rename
IntoLog.into_logger()toIntoLog.into_fern_logger()in order to differentiate from theinto_log()method.
- Add an
- Add a
fern::init_global_logger()method which sets the globallogcrate logger from a log configuration - Add an
InitErrorerror which is used byinit_global_logger()for either an IO error orlog::SetLoggerError - Update everything to use the new io and path modules
- Add a
FileOptionsoption toOutputConfigwhich allows for specifying anOpenOptionsfor opening the log file with
Additional Changes:
- The docs have been rewritten to be up to date with all the above
changes
- The code snippets in the docs are now all tested! This is instead
of having
no_testand not having fully workable code examples.
- The code snippets in the docs are now all tested! This is instead
of having
- There is a new
tests/lib.rsfile which contains tests for initializing fern and log filtering with different log levels.
- Remove the
-
0.1.1221 Feb 2015Release notes
Open source →- Fixes compile warnings and errors for rustc version 522d09dfe (thanks [@gareins]!)
- Adds static life bound
- Switches to using old_path feature instead of path feature
-
0.1.1113 Feb 2015Release notes
Open source →- Fixes small documentation error
- Fixes compile errors in rustc version 3ef8ff1f8
-
0.1.1003 Feb 2015Release notes
Open source →- Finishes updating to rustc version eaf4c5c78
- Last version compiled, but had many warnings
- Move all #[experimental] features to #[unstable]
- Add #![feature(io, core)]
- Remove unrequired .iter() call
- Finishes updating to rustc version eaf4c5c78
-
0.1.828 Jan 2015 -
0.1.710 Jan 2015 -
0.1.607 Jan 2015Release notes
Open source →This update mainly just cleans stuff up and updates for the latest rustc (ea6f65c5f)
- Update to using f.write_str(... instead of write!(f, "{}", ...) for simplicity
- Update to use (closure)(...) instead of closure.call((...)) because directly calling works now
- Remove #![feature()] attributes for unboxed_closures and old_orphan_check, as they are no longer required.
-
0.1.505 Jan 2015Release notes
Open source →- Updates for the latest rustc version, ad9e75938.
- Fixes all lines which go past the 99 character line limit.
-
0.1.402 Jan 2015Release notes
Open source →This version is not backwards compatible. The change was necessary for the latest rust update however, so only a minor version increment was added.
- Changes from using IoResult<()> to Result<(), fern::Error> for return types from logging operations.
- Updates for latest rustc
-
0.1.328 Dec 2014Release notes
Open source →- Adds a new public module, local, which stores a thread-local logger.
- Adds a new logger 'NullLogger', which does nothing with logged mesages.
- Fixes WriterLogger to append to opened files instead of overwriting.
- Adds a ton more documentation
-
0.1.224 Dec 2014Release notes
Open source →- Adds type aliases BoxedLogger and ArcLogger, which resolve to
Box<Logger + Sync + Send>andsync::Arc<Box<Logger + Sync + Send>>respectively.
- Adds type aliases BoxedLogger and ArcLogger, which resolve to
-
0.1.122 Dec 2014 -
0.1.019 Dec 2014