1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Integration layer between `tracing` and Android logs.
//!
//! This crate provides a [`MakeWriter`](tracing_subscriber::fmt::MakeWriter) suitable for writing Android logs.
//!
//! It is designed as an integration with the [`fmt`](tracing_subscriber::fmt) subscriber from `tracing-subscriber`
//! and as such inherits all of its features and customization options.
//!
//! ## Usage
//!
//! ```rust
//! paranoid_android::init(env!("CARGO_PKG_NAME"));
//! ```
//!
//! or with custom options and combined with other layers
//!
//! ```rust
//! # let other_layer = paranoid_android::layer("other");
//! #
//! 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
use ;
pub use ;
/// Creates a [`Subscriber`](tracing_core::Subscriber) with the given tag
/// and attempts to set it as the [global default subscriber] in the current scope, panicking if this fails.
///
/// [global default subscriber]: https://docs.rs/tracing/0.1/tracing/dispatcher/index.html#setting-the-default-subscriber