Popularity
5.7
Stable
Activity
4.1
Declining
254
6
44

Monthly Downloads: 34,741
Programming language: Rust
License: MIT License
Tags: Log     Logging     Logger    

log4rs alternatives and similar packages

Based on the "Logging" category

Do you think we are missing an alternative of log4rs or a related project?

Add another 'Logging' Package

README

log4rs

CircleCI

log4rs is a highly configurable logging framework modeled after Java's Logback and log4j libraries.

Documentation

log4rs.yaml:

refresh_rate: 30 seconds
appenders:
  stdout:
    kind: console
  requests:
    kind: file
    path: "log/requests.log"
    encoder:
      pattern: "{d} - {m}{n}"
root:
  level: warn
  appenders:
    - stdout
loggers:
  app::backend::db:
    level: info
  app::requests:
    level: info
    appenders:
      - requests
    additive: false

lib.rs:

#[macro_use]
extern crate log;
extern crate log4rs;

fn main() {
    log4rs::init_file("config/log4rs.yaml", Default::default()).unwrap();

    info!("booting up");

    // ...
}

License

Licensed under either of

at your option.

Contribution

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.


*Note that all licence references and agreements mentioned in the log4rs README section above are relevant to that project's source code only.