#log-messages #logging #terminal #debugging-logging #warnings #error #print

piglog

A simple, yet beautiful way to print out log messages in the terminal

8 stable releases

1.4.1 Dec 24, 2023
1.3.2 Dec 24, 2023
1.3.1 Nov 5, 2023
1.3.0 Oct 31, 2023

#988 in Rust patterns

Download history 33/week @ 2024-07-28 38/week @ 2024-08-04 27/week @ 2024-08-11 18/week @ 2024-08-18 27/week @ 2024-08-25 26/week @ 2024-09-01 21/week @ 2024-09-08 33/week @ 2024-09-15 52/week @ 2024-09-22 34/week @ 2024-09-29 48/week @ 2024-10-06 31/week @ 2024-10-13 30/week @ 2024-10-20 55/week @ 2024-10-27 35/week @ 2024-11-03 16/week @ 2024-11-10

139 downloads per month
Used in 6 crates

MIT license

28KB
130 lines

PigLog

A simple, yet beautiful way to print stuff in the terminal.

Examples:

use piglog::prelude::*;

fn main() {
  piglog::success!("Hello, world!"); // Something successfully did something!
  piglog::info!("Hello, world!"); // General information.
  piglog::warning!("Hello, world!"); // A warning.
  piglog::error!("Hello, world!"); // Something errored out, but the program can still run.
  piglog::fatal!("Hello, world!"); // Something errored out so bad, the program has to stop!
  piglog::note!("Hello, world!"); // Additional information, kind of like a hint.
  piglog::task!("Hello, world!"); // About something that the programmer has to implement.
  piglog::generic!("Hello, world!"); // A sub log message, basically, a way to continue another log message.

  piglog::piglog_config::enable_debug_log(); // Debug messages don't show up unless this function is called.

  piglog::debug!("Hello, world!"); // Debug log. (Extra log messages for nerds. Lol!)
}

Dependencies

~0–9.5MB
~45K SLoC