Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f86922b authored by Yun-hao Chung's avatar Yun-hao Chung Committed by Gerrit Code Review
Browse files

Merge "Floss: Print log when rust panic" into main

parents a691732b afca803d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ rand = { version = "0.8.3", features = ["small_rng"] }
serde_json = "1.0"
syslog = "6"
tokio = { version = "1", features = ['bytes', 'fs', 'io-util', 'libc', 'macros', 'mio', 'net', 'num_cpus', 'rt', 'rt-multi-thread', 'sync', 'time', 'tokio-macros'] }
log-panics = "2.1.0"

[lib]
path = "src/lib.rs"
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@ use bt_common::init_flags;
use log::LevelFilter;
use syslog::{BasicLogger, Facility, Formatter3164};

use log_panics;

/// API to modify log levels.
pub trait IBluetoothLogging {
    /// Check whether debug logging is enabled.
@@ -33,6 +35,7 @@ impl BluetoothLogging {
            let logger = syslog::unix(formatter).expect("could not connect to syslog");
            let _ = log::set_boxed_logger(Box::new(BasicLogger::new(logger)))
                .map(|()| log::set_max_level(level));
            log_panics::init();
        }

        Self { is_debug }