mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 11:37:47 +01:00
chore: set log level to coco_lib=trace for built Coco app (#595)
This commit is contained in:
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user