slog 2.0.1

Structured, composable logging for Rust
Documentation

slog-rs - The Logging for Rust

Table of Contents

Introduction

slog is an ecosystem of reusable components for structured, extensible, composable logging for Rust.

The ambition is to be The Logging Framework for Rust. slog should accommodate variety of logging features and requirements.

Status & news

slog v2 (versions 2.x.y) is the latest stable major release. API of slog v2 is very similar to slog v1 and most changes are under the hood, unleashing more power. Porting should be relatively easy.

See slog v2 wiki page for more information.

Note: at the time of writing, many important slog ecosystem crates might still not have a stable release for slog v2 and you might need to point to their pre-release versions. Eg. (Cargo.toml excerpt):

slog-term = "~2.0.0-3"

slog v1 (versions 1.x.y) is a previous stable major release. No new development is planed, but bugfixes and PRs are always welcome.

Features & technical documentation

Most of interesting documentation is using rustdoc itself.

You can view on docs.rs/slog for v1 or docs.rs/slog for v2.

Terminal output example

slog-term is only one of many slog features - useful showcase, featuring eg. automatic TTY detection and colors.

See following screenshot: same output in both compact and full output mode.

slog-rs terminal example output

Using & help

See examples/features.rs for full quick code example overview.

See faq for answers to common questions and wiki for other documentation articles. If you want to say hi, or need help use slog-rs gitter channel.

Read Documentation for details and features.

To report a bug or ask for features use github issues.

In your project

In Cargo.toml:

[dependencies]
slog = "2"

In your main.rs:

#[macro_use]
extern crate slog;

Slog community

Slog related crates are hosted under slog github organization.

Dawid Ciężarkiewicz is the original author and current maintainer of slog and therefore self-appointed benevolent dictator over the project. When working on slog Dawid follows and expects everyone to follow his Code of Conduct.

Any particular repositories under slog ecosystem might be created, controlled, maintained by other entities with various level of autonomy. Lets work together toward a common goal in respectful and welcoming atmosphere!

slog-related resources