https://github.com/j-f-liu/logger
A logger crate for Rust.
https://github.com/j-f-liu/logger
Last synced: 3 months ago
JSON representation
A logger crate for Rust.
- Host: GitHub
- URL: https://github.com/j-f-liu/logger
- Owner: J-F-Liu
- License: mit
- Created: 2015-11-12T03:17:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-12T03:59:30.000Z (over 9 years ago)
- Last Synced: 2024-12-28T19:29:41.804Z (5 months ago)
- Language: Rust
- Size: 0 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A logger crate for Rust.
This crate includes a `Logger` trait and the following implementations:
- `FileLogger` Write log to text file.
- `MultiLogger` Write log to multiple loggers.
- `StdoutLogger` Write log to standand output.## Usage
Cargo.toml
```
[dependencies.logger]
git = "https://github.com/J-F-Liu/logger.git"
```Rust code.
```Rust
extern crate logger;use logger::{Logger, MultiLogger};
fn main() {
let logger = MultiLogger::stdout_and_filelogger("backup_folder.log");
logger.info("Start backup");
}
```