4 releases

0.0.7 Feb 11, 2020
0.0.6 Feb 10, 2020
0.0.4 Oct 17, 2019
0.0.1 Oct 15, 2019

#52 in #holo

Download history 18/week @ 2023-07-29 20/week @ 2023-08-05 25/week @ 2023-08-12 19/week @ 2023-08-19 14/week @ 2023-08-26 28/week @ 2023-09-02 20/week @ 2023-09-09 16/week @ 2023-09-16 4/week @ 2023-09-23 16/week @ 2023-09-30 19/week @ 2023-10-07 23/week @ 2023-10-14 22/week @ 2023-10-21 30/week @ 2023-10-28 25/week @ 2023-11-04 102/week @ 2023-11-11

183 downloads per month
Used in 17 crates (5 directly)


845 lines


Project Chat

Twitter Follow

License: Apache-2.0



This logger implementation has been designed to be fast. It delegates most of the heavy work to a dedicated thread. It offers nice filtering capability that can be combined with an optional and easy to use TOML configuration.


To have a generale view of the capability of this crate, you can run this command:

cargo run --example simple-fastlog-example


cargo run --example from-toml-fastlog-example

Additional examples can be found here as well.

CLI Support

This logging factory handles the environnement variable RUST_LOG as well so it can be used like this (the logger has to be registered):

RUST_LOG="debug" path/to/exec

Building a logger

Here is an example of how to simply build a logger with the Debug log verbosity level:

    // Optionally you can specify your custom timestamp format
    .timestamp_format("%Y-%m-%d %H:%M:%S%.6f")
    .expect("Fail to init the logging factory.");

debug!("What's bugging you today?");


Filtering out every log from dependencies and putting back in everything related to a particular target is easy:

let toml = r#"
level = "debug"

pattern = ".*"
exclude = true

pattern = "^holochain"
exclude = false

.expect("Fail to instantiate the logger from toml.")
.expect("Fail to build logger from toml.");

// Should NOT be logged
debug!(target: "rpc", "This is our dependency log filtering.");

// Should be logged each in different color. We avoid filtering by prefixing using the 'target'
// argument.
info!(target: "holochain", "Log message from Holochain Core.");
info!(target: "holochain-app-2", "Log message from Holochain Core with instance ID 2");


License: Apache-2.0

Copyright (C) 2019, Holochain Foundation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


~148K SLoC