feat: logging to log file

This commit is contained in:
Michel de Graaf
2025-11-18 15:49:53 +01:00
parent 4c6d7c6850
commit 2ba48663e4
3 changed files with 115 additions and 4 deletions
+5
View File
@@ -29,6 +29,11 @@ fn main() -> Result<()> {
};
env::set_var("LOG_LEVEL", log_level);
// Set LOG_FILE env var if provided via CLI
if let Some(log_file) = &cli.log_file {
env::set_var("LOG_FILE", log_file.to_string_lossy().to_string());
}
let username = cli.username
.ok_or_else(|| color_eyre::eyre::eyre!("Username required: use --username or set SOULSEEK_USERNAME env var"))?;