6 releases

new 0.2.2 Apr 12, 2024
0.2.1 May 26, 2022
0.2.0 Apr 16, 2022
0.1.2 Dec 3, 2021

#375 in Debugging

Download history 43/week @ 2023-12-23 224/week @ 2023-12-30 294/week @ 2024-01-06 304/week @ 2024-01-13 382/week @ 2024-01-20 261/week @ 2024-01-27 526/week @ 2024-02-03 124/week @ 2024-02-10 144/week @ 2024-02-17 308/week @ 2024-02-24 198/week @ 2024-03-02 267/week @ 2024-03-09 530/week @ 2024-03-16 274/week @ 2024-03-23 164/week @ 2024-03-30 252/week @ 2024-04-06

1,285 downloads per month
Used in 2 crates

MIT license

16KB
297 lines

paranoid-android

Integration layer between tracing and Android logs

Crates.io docs.rs

This crate provides a MakeWriter suitable for writing Android logs.

It is designed as an integration with the fmt subscriber from tracing-subscriber and as such inherits all of its features and customization options.


lib.rs:

Integration layer between tracing and Android logs.

This crate provides a MakeWriter suitable for writing Android logs.

It is designed as an integration with the fmt subscriber from tracing-subscriber and as such inherits all of its features and customization options.

Usage

paranoid_android::init(env!("CARGO_PKG_NAME"));

or with custom options and combined with other layers

#
use tracing_subscriber::filter::LevelFilter;
use tracing_subscriber::fmt::FmtSpan;
use tracing_subscriber::prelude::*;

let android_layer = paranoid_android::layer(env!("CARGO_PKG_NAME"))
    .with_span_events(FmtSpan::CLOSE)
    .with_thread_names(true)
    .with_filter(LevelFilter::DEBUG);

tracing_subcriber::registry()
    .with(android_layer)
    .with(other_layer)
    .init();

Cargo features

  • api-30: Enables support for Android API level 30 and source location information

Dependencies

~1.1–2MB
~45K SLoC