log4rs is a highly configurable logging framework modeled after Java's Logback and log4j libraries.
If you are using the file rotation in your configuration there is a known substantial performance issue so listen up!
By default the
gzip feature is enabled and when rolling files it will zip log archives automatically. This is a problem
when the log archives are large as the zip happens in the main thread and will halt the process while the zip is completed.
Be advised that the
gzip feature will be removed from default features as of
The methods to mitigate this are as follows.
- Use the
background_rotationfeature which spawns an os thread to do the compression.
- Disable the
- Ensure the archives are small enough that the compression time is acceptable.
For more information see the PR that added
Rust Version Requirements
Building for Dev
- Run the tests:
cargo test --all-features
- Run the tests for windows with cross:
cross test --target x86_64-pc-windows-gn
- Run the tests for all individual features:
- Run the tests for all individual features for windows with cross:
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or #404)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.