Crate outlog

Source
Expand description

§Outlog

Outlog is a logging implementation based on the log crate.
It is designed to be as simple as possible, while still providing good looking log output.

§Usage

#[macro_use]
extern crate outlog;

outlog::init_with_default().expect("Failed to initialize logging!");

info!("Hello, World");

§Cargo Features

The following features can be enabled when including outlog as a dependency:

  • color: Enables colored output using SGR Sequences and the atty crate.
  • chrono: Enables outputting the local time using the chrono crate.
  • panic: Enables a custom panic hook that prints panic messages with error! (Backtraces aren’t supported).
  • config-serde: Enables serializing/deserializing the Config struct with serde.
  • all: Enables all of the above.

Macros§

debug
Logs a message at the debug level.
error
Logs a message at the error level.
info
Logs a message at the info level.
trace
Logs a message at the trace level.
warn
Logs a message at the warn level.

Structs§

Config
Logging configuration.

Enums§

LevelFilter
An enum representing the available verbosity level filters of the logger.

Functions§

init
Initializes the logging system with the given configuration.
init_with_default
Initializes the logging system with the default configuration.
init_with_level
Initializes the logging system with the given level.