slog 1.0.0-alpha2

Structured, composable logging for Rust
Documentation
use super::Record;

use super::OwnedKeyValueList;

use std::io;

#[allow(missing_docs)]
mod error {
    use std::io;
    use super::super::ser;

    error_chain! {
        types {
            Error, ErrorKind, ChainErr, Result;
        }
        links {
            ser::Error, ser::ErrorKind, Serialization;
        }
        foreign_links {
            io::Error, Io, "io error";
        }
        errors {}
    }
}

pub use self::error::{Error, Result, ErrorKind};

/// Formats `Record`-s into IO
pub trait Format: Send + Sync + Sized {
    /// Format one logging record and write into `io`
    fn format(&self,
              io: &mut io::Write,
              info: &Record,
              logger_values: &OwnedKeyValueList)
              -> Result<()>;
}