| Crates.io | hagja |
| lib.rs | hagja |
| version | 0.1.0 |
| created_at | 2025-12-24 04:53:12.481403+00 |
| updated_at | 2025-12-24 04:53:12.481403+00 |
| description | A lightweight and robust logger system for Rust. |
| homepage | |
| repository | https://github.com/lunaNoir25/hagja |
| max_upload_size | |
| id | 2002746 |
| size | 53,461 |
A lightweight and robust logger system for rust. Hagja provides clean outputs, logging to files, and coloured logs.
Copyright (c) 2025 Luna Moonlit Noir lunaNoir.sk@gmail.com GNU General Public License v3.0
use hagja::*;
let id = "My rust project.";
let logger: Hagja = Hagja::new(id, LogLevel::Info, false, None);
set_default_logger(logger).expect("unable to set default logger");
info!("Hello, world!");
id: &'static str = Unique identifer for your project.
log_level: LogLevel = Log level, use info for consumer ready use, debug or trace for development use.
write_file: bool = Write to output file or not.
file: Option<Arc<Mutex<File>>> = Set to None if write_file is set to false. Requires std::fs::File and std::sync::{Arc, Mutex}. Prior file creation needed first.