Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ dns-over-h3 = ["shadowsocks-service/dns-over-h3"]
# Enable logging output
logging = [
"log4rs",
"syslog-tracing",
"tracing",
"tracing-subscriber",
"time",
Expand Down Expand Up @@ -249,7 +250,7 @@ windows-service = { version = "0.8", optional = true }

[target.'cfg(unix)'.dependencies]
xdg = "3.0"
syslog-tracing = "0.3"
syslog-tracing = { version = "0.3", optional = true }

[target.'cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64"))'.dependencies]
reqwest = { version = "0.12", features = [
Expand Down
6 changes: 2 additions & 4 deletions src/logging/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,8 @@ fn make_syslog_writer(bin_name: &str, config: &LogSyslogWriterConfig) -> Syslog
let options = Options::default();
let identity = CString::new(identity).expect("syslog identity contains null-byte ('\\0')");

let syslogger = match Syslog::new(identity, options, facility) {
match Syslog::new(identity, options, facility) {
Some(l) => l,
None => panic!("syslog is already initialized"),
};

syslogger
}
}
Loading