From 1a6627ee7d085a4e66784e2705254714d68c7244 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 1 Sep 2025 13:55:59 -0300 Subject: [PATCH] feat(cli): set default log level when adding the log plugin (#14122) * feat(cli): set default log level when adding the log plugin needs https://github.com/tauri-apps/plugins-workspace/pull/2965 ref #14075 * Update crates/tauri-cli/src/add.rs --- .changes/default-log-level.md | 6 ++++++ crates/tauri-cli/src/add.rs | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 .changes/default-log-level.md diff --git a/.changes/default-log-level.md b/.changes/default-log-level.md new file mode 100644 index 000000000..7b3f0ca3e --- /dev/null +++ b/.changes/default-log-level.md @@ -0,0 +1,6 @@ +--- +"@tauri-apps/cli": patch:enhance +"tauri-cli": patch:enhance +--- + +Set a default log level filter when running `tauri add log`. diff --git a/crates/tauri-cli/src/add.rs b/crates/tauri-cli/src/add.rs index aed598ec4..302bd026c 100644 --- a/crates/tauri-cli/src/add.rs +++ b/crates/tauri-cli/src/add.rs @@ -132,6 +132,8 @@ pub fn run(options: Options) -> Result<()> { "Builder::new(todo!()).build()" } else if plugin == "single-instance" { "init(|app, args, cwd| {})" + } else if plugin == "log" { + "Builder::new().level(tauri_plugin_log::log::LevelFilter::Info).build()" } else if metadata.builder { "Builder::new().build()" } else {