2 releases

0.1.2 Jun 29, 2023
0.1.1 Jun 26, 2023
0.1.0 Jun 18, 2023

#490 in Debugging

Download history 2/week @ 2024-02-13 15/week @ 2024-02-20 27/week @ 2024-02-27 1/week @ 2024-03-05 21/week @ 2024-03-12 5/week @ 2024-03-19 10/week @ 2024-03-26 46/week @ 2024-04-02

83 downloads per month

BSD-2-Clause

6KB
55 lines

Instant Log

I really like logs in a very simple consistent way across my applications. This incredibly simple log with a timestamp, log level and a log message Console only, file options may be added but this is really intended for containers.

Example Output

2023-06-18 14:26:00 - INFO  - Hello World!
2023-06-18 14:26:10 - ERROR - Bye World!

Example Usage

use instant_log as log;

fn main() {
    log::debug(format("Hello {}!", "World"));
    log::info("Hello World!");
    log::warn("Be careful!");
    log::error("Too Late!");
    log::fatal(format("error {}!", error.to_string()));
}

Configuration can be done via environment variable LOG_LEVEL Valid log levels, defaults to INFO

  • debug|DEBUG
  • info|INFO
  • warn|WARN
  • error|ERROR
  • fatal|FATAL

Dependencies

~1MB
~19K SLoC