tracing-fmt-smart-writer

Crates.iotracing-fmt-smart-writer
lib.rstracing-fmt-smart-writer
version0.3.0
sourcesrc
created_at2021-07-14 04:06:19.385566
updated_at2023-02-22 00:56:14.143467
descriptionSmart writer for tracing-subscriber's fmt module
homepage
repositoryhttps://github.com/DoumanAsh/tracing-fmt-smart-writer
max_upload_size
id422556
size9,022
Douman (DoumanAsh)

documentation

README

tracing-fmt-smart-writer

Crates.io Documentation Build

Smarter writer builder for tracing-subscriber's fmt module Version corresponds to major tracing-subscriber version.

Usage

use tracing_fmt_smart_writer::{WriterBuilder, tracing_subscriber};

tracing_subscriber::fmt::Subscriber::builder().with_writer(WriterBuilder::new())
                                              .init();

Platform selection

Android

Writes into logcat

Level map (tracing to logcat)
  • ERROR -> ERROR;
  • WARN -> WARN;
  • INFO -> INFO;
  • DEBUG -> DEBUG;
  • TRACE -> VERBOSE;

Web

Writes using console

Level map (tracing to console)
  • ERROR -> console.error;
  • WARN -> console.warn;
  • INFO -> console.info;
  • DEBUG -> console.debug;
  • TRACE -> console.debug;

Others

Writes into stdout

Commit count: 3

cargo fmt