| Crates.io | log-assist |
| lib.rs | log-assist |
| version | 0.1.2 |
| created_at | 2025-10-23 14:38:15.691081+00 |
| updated_at | 2025-10-23 17:15:41.523608+00 |
| description | Async-friendly log assist lib for Seq (now), with pluggable sinks for rolling files (next). |
| homepage | https://github.com/ikaranmali/log-assist-rs# |
| repository | https://github.com/ikaranmali/log-assist-rs# |
| max_upload_size | |
| id | 1897198 |
| size | 63,985 |
A cargo crate library Async-friendly structured logger for Seq that automatically uses your Cargo project name, and safely reports panics (with file & line) even when the runtime is shutting down.
seq::init() onceAdd to Cargo.toml:
[dependencies]
log-assist = "0.1.1"
anyhow = "1.0"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
cargo add log-assist
use log_assist::{seq,TimeMode,Config};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
seq::init(Config {
application_name: "Log-Assist-Example".to_string().into(),
endpoint: "http://localhost:5341".into(),
api_key: None,
queue_capacity: 10_000,
flush_interval_ms: 1000,
time_mode: TimeMode::Utc,
enable_panic_hook: true
}).await?;
seq::info("Starting example", serde_json::json!({"env": "dev"})).await;
seq::warn("Warning", serde_json::json!({"env": "dev"})).await;
seq::error("Error", serde_json::json!({"env": "dev"})).await;
panic!("Intentional panic test"); // shows panic hook behavior
}