summaryrefslogtreecommitdiff
path: root/system/rust/src/utils.rs
blob: 0183d8b51430d81b031f28597a0023fa4d17ea0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Utilities that are not specific to a particular module

pub mod owned_handle;

#[cfg(test)]
pub mod task;

/// Inits logging for Android
#[cfg(target_os = "android")]
pub fn init_logging() {
    android_logger::init_once(android_logger::Config::default().with_tag("bluetooth"));
}

/// Inits logging for host
#[cfg(not(target_os = "android"))]
pub fn init_logging() {
    env_logger::Builder::new().parse_default_env().try_init().ok();
}