blob: b7cd420b2a060d5eef0a976dee662ae5e54c668c (
plain)
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
|
Adds option to disable logging to allow use without syslog
--- a/src/config.rs
+++ b/src/config.rs
@@ -234,6 +234,10 @@ pub struct CliConfig {
#[arg(long)]
pub no_daemon: bool,
+ /// If set, starts spotifyd without logging/output
+ #[arg(long)]
+ pub nolog: bool,
+
/// Path to PID file.
#[cfg(unix)]
#[arg(long, value_name = "PATH")]
--- a/src/main.rs
+++ b/src/main.rs
@@ -149,7 +149,9 @@ fn run_daemon(mut cli_config: CliConfig) -> eyre::Result<()> {
}
};
- setup_logger(log_target, cli_config.verbose)?;
+ if !cli_config.nolog {
+ setup_logger(log_target, cli_config.verbose)?;
+ }
cli_config
.load_config_file_values()
|