easy-logs

Crates.ioeasy-logs
lib.rseasy-logs
version0.1.4
sourcesrc
created_at2022-08-16 09:40:35.200024
updated_at2022-08-16 21:45:08.434681
descriptionA simple and lightweight rust logging library.
homepagehttps://zackbalbin.com/
repositoryhttps://github.com/zackbalbin/easy-logs
max_upload_size
id646532
size15,057
Zack Balbin (zackbalbin)

documentation

https://docs.rs/easy-logs

README

Easy Logging Library

A simple and lightweight rust logging library.

Examples

Logging to a file and console

use lib::Logger;

fn main() {
    let mut logger: Logger = Logger::new();
    logger.output_to_file(None);

    logger.info("Hello, world!");
    logger.warn("Hello, world!");
    logger.error("Hello, world!");
    logger.debug("Hello, world!");
}

Logging to just the console

use lib::Logger;

fn main() {
    let logger: Logger = Logger::new();
    logger.info("Hello, world!");
    logger.warn("Hello, world!");
    logger.error("Hello, world!");
    logger.debug("Hello, world!");
}
Commit count: 7

cargo fmt