glore

Crates.ioglore
lib.rsglore
version0.1.4
sourcesrc
created_at2019-08-05 23:10:55.260108
updated_at2020-01-11 18:18:17.841683
descriptionRust log
homepage
repositoryhttps://github.com/sigmaSd/Glore
max_upload_size
id154417
size5,384
Bedis Nbiba (sigmaSd)

documentation

README

Glore

Rust Log

HowTo:

1- Use glore::GLORE at the root of your project

2- Add a log target with glore::init($target) $target is anything that impl Write

3- log!

example of usage:

use glore::{init, log, GLORE};

let f = std::fs::OpenOptions::new()
	.append(true)
	.open("log.txt")
	.unwrap();
let stdout = std::io::stdout();

init(stdout);
log!("hello ====");
log!("world");

init(f);
log!("hello ====");
std::thread::spawn(|| {
	log!("world");
})
.join();

Important

  • This crate uses unsafe (to modify global log)
Commit count: 24

cargo fmt