Crate loglog [] [src]

loglog

loglog aims to be a simple and ergonomic logger that you can drop straight into your code. It uses env_logger behind the scenes, so you can use your familiar log crate macros.

Usage

Add loglog to your Cargo.toml:

[dependencies]
log = "0.3"
loglog = "0.3"

After initializing the logger, the log crate macros will be available.

Example

#[macro_use] extern crate log;
extern crate loglog;

fn main() {
    loglog::build()
        .time(Some("%H:%M"))
        .init()
        .unwrap();

    info!("This is an informational {}", "message");
    error!("This is not good!");
}

Structs

Error

The Error type.

LogLogBuilder

The main logger builder.

Enums

ErrorKind

The kind of an error.

Traits

ResultExt

Additional methods for Result, for easy interaction with this crate.

Functions

build

Create the logger builder with some default values.

init

Quickly create the builder and start the logger.

Type Definitions

Result

Convenient wrapper around std::Result.