7 releases (1 stable)

Uses old Rust 2015

1.0.0 Aug 11, 2018
0.2.0 Aug 10, 2018
0.1.4 Aug 10, 2018

#614 in Debugging

Download history 2/week @ 2023-11-09 1/week @ 2023-11-16 7/week @ 2023-11-23 23/week @ 2023-11-30 7/week @ 2023-12-14 14/week @ 2023-12-21 7/week @ 2023-12-28 7/week @ 2024-01-18 7/week @ 2024-01-25 7/week @ 2024-02-01 8/week @ 2024-02-08 76/week @ 2024-02-15 207/week @ 2024-02-22

298 downloads per month

GPL-3.0-only

17KB
58 lines

rlog

Build Status Docs Badge crates.io Badge

Minimal file-based logging library.

Usage

Quickstart

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!

Available options

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).

License

Licensed under GPL 3.0. See LICENSE for details.

© 2018 by Mateusz Makowski matmakos@gmail.com

Dependencies

~1MB
~18K SLoC