Skip to content

Commit

Permalink
Merge branch 'main' into filter_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bconn98 authored Mar 3, 2024
2 parents ef454ab + bcd7fb0 commit 276e047
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,6 @@
log4rs is a highly configurable logging framework modeled after Java's Logback
and log4j libraries.

## Warning

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 `1.0`.

The methods to mitigate this are as follows.

1. Use the `background_rotation` feature which spawns an os thread to do the compression.
1. Disable the `gzip` feature with `--no-default-features`.
1. Ensure the archives are small enough that the compression time is acceptable.

For more information see the PR that added [`background_rotation`](https://github.com/estk/log4rs/pull/117).

## Quick Start

log4rs.yaml:
Expand Down Expand Up @@ -82,6 +65,23 @@ fn main() {
* Run the tests for all individual features for windows with
[cross](https://github.com/rust-embedded/cross): `./test.sh win`


## Compression

If you are using the file rotation in your configuration there is a known
substantial performance issue with the `gzip` feature. 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.

The methods to mitigate this are as follows.

1. Use the `background_rotation` feature which spawns an os thread to do the compression.
2. Do not enable the `gzip` feature.
3. Ensure the archives are small enough that the compression time is acceptable.

For more information see the PR that added [`background_rotation`](https://github.com/estk/log4rs/pull/117).

## License

Licensed under either of
Expand Down

0 comments on commit 276e047

Please # to comment.