Librarius
Librarius is a logging library in Rust that provides logging functionality for different severity levels, such as Info, Warn, Error, and Debug. The library allows logs to be sent to the terminal or a file, depending on the configuration. It is easy to integrate and configure within any Rust application.
Features
- Support for multiple log levels:
Info,Warn,Error,Debug. - Logs can be output to the terminal or written to a file.
- Custom log formatting with date, time, and timezone.
- Easy integration with logging macros (
info!,warn!,error!). - Simple configuration using the
Configstruct.
Installation
Add the following dependency to your Cargo.toml:
[]
= "0.1"
Usage Example
Logging at the terminal
use ;
Logging at a file
use ;
Configuration
You can configure Librarius by creating a Config, where you define the log level and whether logs should be written to a file:
use ;
let config = with_file;
License
This project is licensed under the MIT License - see the LICENSE file for details.