chore: set log level to coco_lib=trace for built Coco app (#595)

This commit is contained in:
SteveLauC
2025-06-03 11:18:28 +08:00
committed by GitHub
parent 18feb2d690
commit f557f7e780

View File

@@ -585,6 +585,12 @@ fn set_up_tauri_logger() -> TauriPlugin<tauri::Wry> {
builder builder
} }
// When running the built binary, set `COCO_LOG` to `coco_lib=trace` to capture all logs
// that come from Coco in the log file, which helps with debugging.
if !tauri::is_dev() {
std::env::set_var("COCO_LOG", "coco_lib=trace");
}
let mut builder = tauri_plugin_log::Builder::new(); let mut builder = tauri_plugin_log::Builder::new();
builder = builder.format(|out, message, record| { builder = builder.format(|out, message, record| {
let now = chrono::Local::now().format("%m-%d %H:%M:%S"); let now = chrono::Local::now().format("%m-%d %H:%M:%S");