[package] name = "log4rs" version = "1.3.0" authors = ["Steven Fackler ", "Evan Simmons "] description = "A highly configurable multi-output logging implementation for the `log` facade" license = "MIT OR Apache-2.0" repository = "https://github.com/estk/log4rs" readme = "README.md" keywords = ["log", "logger", "logging", "log4"] edition = "2018" rust-version = "1.69" [features] default = ["all_components", "config_parsing", "yaml_format"] config_parsing = ["humantime", "serde", "serde-value", "typemap-ors", "log/serde"] yaml_format = ["serde_yaml"] json_format = ["serde_json"] toml_format = ["toml"] console_appender = ["console_writer", "simple_writer", "pattern_encoder"] file_appender = ["parking_lot", "simple_writer", "pattern_encoder"] rolling_file_appender = ["parking_lot", "simple_writer", "pattern_encoder"] compound_policy = [] delete_roller = [] fixed_window_roller = [] size_trigger = [] time_trigger = ["rand"] json_encoder = ["serde", "serde_json", "chrono", "log-mdc", "log/serde", "thread-id"] pattern_encoder = ["chrono", "log-mdc", "thread-id"] ansi_writer = [] console_writer = ["ansi_writer", "libc", "winapi"] simple_writer = [] threshold_filter = [] background_rotation = [] all_components = [ "console_appender", "file_appender", "rolling_file_appender", "compound_policy", "delete_roller", "fixed_window_roller", "size_trigger", "time_trigger", "json_encoder", "pattern_encoder", "threshold_filter" ] gzip = ["flate2"] [[bench]] name = "rotation" harness = false [dependencies] arc-swap = "1.6" chrono = { version = "0.4.23", optional = true, features = ["clock"], default-features = false } flate2 = { version = "1.0", optional = true } fnv = "1.0" humantime = { version = "2.1", optional = true } log = { version = "0.4.20", features = ["std"] } log-mdc = { version = "0.1", optional = true } serde = { version = "1.0", optional = true, features = ["derive"] } serde-value = { version = "0.7", optional = true } thread-id = { version = "4", optional = true } typemap-ors = { version = "1.0.0", optional = true } serde_json = { version = "1.0", optional = true } serde_yaml = { version = "0.9", optional = true } toml = { version = "0.8", optional = true } parking_lot = { version = "0.12.0", optional = true } rand = { version = "0.8", optional = true} thiserror = "1.0.15" anyhow = "1.0.28" derivative = "2.2" once_cell = "1.17.1" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3", optional = true, features = ["handleapi", "minwindef", "processenv", "winbase", "wincon"] } [target.'cfg(not(windows))'.dependencies] libc = { version = "0.2", optional = true } [dev-dependencies] lazy_static = "1.4" streaming-stats = "0.2.3" humantime = "2.1" tempfile = "3.8" mock_instant = "0.3" [[example]] name = "json_logger" required-features = ["json_encoder", "console_appender"] [[example]] name = "log_to_file" required-features = ["console_appender", "file_appender", "rolling_file_appender"] [[example]] name = "compile_time_config" required-features = ["yaml_format", "config_parsing"] [[example]] name = "log_to_file_with_rolling" required-features = ["file_appender", "rolling_file_appender", "size_trigger"] [[example]] name = "multi_logger_config" required-features = ["yaml_format", "config_parsing"]