Avoid oslog on iOS simulator builds
This commit is contained in:
parent
e0fe21fad8
commit
5bd95b7a7c
2 changed files with 7 additions and 2 deletions
|
|
@ -25,7 +25,6 @@ tun = { version = "0.1", path = "../tun", features = ["serde", "tokio"] }
|
|||
clap = { version = "4.4", features = ["derive"] }
|
||||
tracing = "0.1"
|
||||
tracing-log = "0.1"
|
||||
tracing-oslog = { git = "https://github.com/Stormshield-robinc/tracing-oslog" }
|
||||
tracing-subscriber = { version = "0.3", features = ["std", "env-filter"] }
|
||||
log = "0.4"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
|
|
@ -82,6 +81,9 @@ libc = "0.2"
|
|||
nix = { version = "0.27", features = ["ioctl"] }
|
||||
rusqlite = { version = "0.38.0", features = ["bundled", "blob"] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
tracing-oslog = { git = "https://github.com/Stormshield-robinc/tracing-oslog" }
|
||||
|
||||
[dev-dependencies]
|
||||
insta = { version = "1.32", features = ["yaml"] }
|
||||
|
||||
|
|
|
|||
|
|
@ -29,12 +29,15 @@ pub fn initialize() {
|
|||
}
|
||||
};
|
||||
|
||||
#[cfg(target_vendor = "apple")]
|
||||
#[cfg(target_os = "macos")]
|
||||
let system_log = Some(tracing_oslog::OsLogger::new(
|
||||
"com.hackclub.burrow",
|
||||
"tracing",
|
||||
));
|
||||
|
||||
#[cfg(all(target_vendor = "apple", not(target_os = "macos")))]
|
||||
let system_log = None::<tracing_subscriber::layer::Identity>;
|
||||
|
||||
let stderr = (console::user_attended_stderr() || system_log.is_none()).then(|| {
|
||||
tracing_subscriber::fmt::layer()
|
||||
.with_level(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue