https://github.com/ciubix8513/lunar-logger
Simple logger, wich can write to file
https://github.com/ciubix8513/lunar-logger
logging rust rust-lang
Last synced: 5 months ago
JSON representation
Simple logger, wich can write to file
- Host: GitHub
- URL: https://github.com/ciubix8513/lunar-logger
- Owner: Ciubix8513
- License: mit
- Created: 2024-05-11T20:18:22.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-20T23:53:53.000Z (about 2 years ago)
- Last Synced: 2024-07-08T09:20:55.401Z (almost 2 years ago)
- Topics: logging, rust, rust-lang
- Language: Rust
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# lunar-logger
Simple logger, that can.. well... log stuff, both to console and to a file.
Works mostly like env_logger, except configured entirely from code and can write to files by
itself. Also supports logging on wasm.
## Usage:
```rs
use lunar_logger::Logger;
let mut logger = Logger::new();
logger.add_filter("wgpu", lunar_logger::FilterType::Crate, log::LevelFilter::Warn);
logger.set_default_filter(log::LevelFilter::Info);
logger.enable_logger();
log::info!("It works!");
```