[package] name = "spdlog-rs" version = "0.4.0" edition = "2021" rust-version = "1.60" description = "Fast, highly configurable Rust logging crate, inspired by the C++ logging library spdlog" repository = "https://github.com/SpriteOvO/spdlog-rs" license = "MIT OR Apache-2.0" keywords = ["spdlog", "log", "logging"] categories = ["development-tools::debugging"] [package.metadata.docs.rs] all-features = true [lib] name = "spdlog" [features] level-off = [] level-critical = [] level-error = [] level-warn = [] level-info = [] level-debug = [] level-trace = [] release-level-off = [] release-level-critical = [] release-level-error = [] release-level-warn = [] release-level-info = [] release-level-debug = [] release-level-trace = [] source-location = [] native = [] libsystemd = ["libsystemd-sys"] multi-thread = ["crossbeam"] runtime-pattern = ["spdlog-internal"] serde_json = ["serde", "dep:serde_json"] [dependencies] arc-swap = "1.5.1" atomic = "0.5.1" cfg-if = "1.0.0" chrono = "0.4.22" crossbeam = { version = "0.8.2", optional = true } dyn-clone = "1.0.14" flexible-string = { version = "0.1.0", optional = true } if_chain = "1.0.2" is-terminal = "0.4" log = { version = "0.4.8", optional = true } once_cell = "1.16.0" serde = { version = "1.0.163", optional = true, features = ["derive"] } serde_json = { version = "1.0.120", optional = true } spdlog-internal = { version = "=0.1.0", path = "../spdlog-internal", optional = true } spdlog-macros = { version = "=0.2.0", path = "../spdlog-macros" } spin = "0.9.8" thiserror = "1.0.37" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3.9", features = ["consoleapi", "debugapi", "handleapi", "processenv", "processthreadsapi", "winbase", "wincon"] } [target.'cfg(unix)'.dependencies] libc = "0.2" [target.'cfg(target_os = "linux")'.dependencies] libsystemd-sys = { version = "0.9.3", optional = true } [dev-dependencies] clap = { version = "3.2.23", features = ["derive"] } crossbeam = "0.8.2" regex = "1.7.0" paste = "1.0.14" trybuild = "1.0.90" # [bench-dependencies] log = "=0.4.22" slog = "=2.7.0" sloggers = "=2.2.0" log4rs = "=1.3.0" fast_log = "=1.7.4" fern = "=0.6.2" flexi_logger = "=0.29.2" ftlog = "=0.2.14" tracing = "=0.1.40" tracing-subscriber = "=0.3.18" tracing-appender = "=0.2.3" [build-dependencies] rustc_version = "0.4.0" [[test]] name = "global_async_pool_sink" harness = false required-features = ["multi-thread"] [[bench]] name = "spdlog_rs" path = "benches/spdlog-rs/spdlog_rs.rs" [[bench]] name = "spdlog_rs_compare_with_cpp_spdlog" path = "benches/spdlog-rs/compare_with_cpp_spdlog.rs" harness = false [[bench]] name = "spdlog_rs_compare_with_cpp_spdlog_async" path = "benches/spdlog-rs/compare_with_cpp_spdlog_async.rs" harness = false [[bench]] name = "spdlog_rs_pattern" path = "benches/spdlog-rs/pattern.rs" required-features = ["runtime-pattern", "serde_json"] [[bench]] name = "fast_log" path = "benches/fast_log/main.rs" harness = false [[bench]] name = "fast_log_1_file_async" path = "benches/fast_log/1_file_async.rs" [[bench]] name = "fast_log_2_rotating_file_size_async" path = "benches/fast_log/2_rotating_file_size_async.rs" [[bench]] name = "fast_log_3_rotating_daily_async" path = "benches/fast_log/3_rotating_daily_async.rs" [[bench]] name = "fast_log_4_level_off" path = "benches/fast_log/4_level_off.rs" [[bench]] name = "fern" path = "benches/fern/main.rs" harness = false [[bench]] name = "fern_1_file" path = "benches/fern/1_file.rs" [[bench]] name = "fern_2_level_off" path = "benches/fern/2_level_off.rs" [[bench]] name = "ftlog" path = "benches/ftlog/main.rs" harness = false [[bench]] name = "ftlog_1_file_async" path = "benches/ftlog/1_file_async.rs" [[bench]] name = "ftlog_2_rotating_daily" path = "benches/ftlog/2_rotating_daily.rs" [[bench]] name = "ftlog_3_level_off" path = "benches/ftlog/3_level_off.rs" [[example]] name = "06_log_crate" required-features = ["log"] [[example]] name = "07_async" required-features = ["multi-thread"]