Crates.io | rlog |
lib.rs | rlog |
version | 1.0.0 |
source | src |
created_at | 2018-08-10 07:57:49.279543 |
updated_at | 2018-08-11 18:48:57.845186 |
description | Minimal file-based logging library. |
homepage | |
repository | https://github.com/makos/rlog |
max_upload_size | |
id | 78638 |
size | 48,224 |
Minimal file-based logging library.
Cargo.toml
[dependencies]
"rlog" = "1"
src/main.rs
extern crate rlog;
use rlog::Logger;
let log = Logger::new("./test.log", "");
log.log("Dear diary, today I wrote some Rust code!");
Output:
test.log
10.08.2018 09:47.12 Dear diary, today I wrote some Rust code!
When instantiating a new logger instance, you can set the logfile path
and desired log format
.
path
is a relative or absolute path to your log file, and format
is an ISO8061-style timestamp (e.g. %d-%m-%y %H:%M
).
Licensed under GPL 3.0. See LICENSE for details.
© 2018 by Mateusz Makowski matmakos@gmail.com