{"id":57662,"library":"slog-async","title":"slog-async","description":"Asynchronous drain for slog-rs that moves logging work off the critical path.","status":"active","version":"2.8.0","language":"rust","source_language":null,"source_url":"https://github.com/slog-rs/async","tags":["logging","async","slog","drain"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nslog-async = \"2.8.0\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add slog-async","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"Async","correct":"use slog_async::Async;"}],"quickstart":{"code":"use slog::{o, Drain};\nuse slog_async::Async;\n\nfn main() {\n    let drain = slog::Discard;\n    let async_drain = Async::new(drain).build().fuse();\n    let logger = slog::Logger::root(async_drain, o!());\n    info!(logger, \"async logging\");\n}","lang":"rust","description":"Creates an asynchronous logger using slog-async."},"warnings":[{"fix":"Ensure an async runtime is active before logging, or use the default `Async::default()` which spawns a dedicated thread.","message":"Async drain requires a running tokio or async-std runtime if used with `Async::new().build().fuse()` in async context.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'async':3,19 'asynchron':4 'critic':16 'drain':5,21 'log':12,18 'move':11 'path':17 'rs':9 'slog':2,8,20 'slog-async':1 'slog-r':7 'work':13","created_at":"2026-06-16T15:52:39.856773+00:00","updated_at":"2026-06-16T15:52:39.856773+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/slog-rs/slog","github":"https://github.com/slog-rs/async","docs":"https://docs.rs/slog-async/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["logging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}