5 stable releases

Uses old Rust 2015

2.0.2 Dec 29, 2018
2.0.1 Dec 31, 2017
1.0.1 Jul 13, 2017

#546 in Text processing

Download history 1793/week @ 2023-11-01 1749/week @ 2023-11-08 1708/week @ 2023-11-15 1426/week @ 2023-11-22 1348/week @ 2023-11-29 2080/week @ 2023-12-06 1419/week @ 2023-12-13 1032/week @ 2023-12-20 1043/week @ 2023-12-27 1481/week @ 2024-01-03 1632/week @ 2024-01-10 2104/week @ 2024-01-17 1409/week @ 2024-01-24 1275/week @ 2024-01-31 1579/week @ 2024-02-07 1035/week @ 2024-02-14

5,717 downloads per month
Used in 49 crates (44 directly)

BSD-3-Clause

12KB
159 lines

Crate Documentation Linux/OS X Windows
Crate Documentation Build Status Build Status

A simple logger for the log facade. One log message is written per line. Each line also includes the time it was logged, the logging level and the ID of the thread.

Examples

Most users will simply need to call log_to_file() with the path to the log file and minimum log level:

use log::LevelFilter;

simple_logging::log_to_file("test.log", LevelFilter::Info);

Or use log_to_stderr() if simply logging to stderr:

use log::LevelFilter;

simple_logging::log_to_stderr(LevelFilter::Info);

For more control, log_to() can be used with an arbitrary sink implementing Write + Send + 'static:

use log::LevelFilter;
use std::io;

simple_logging::log_to(io::sink(), LevelFilter::Info);

Dependencies

~61–330KB