From 2df3d9368187e1d2ce736d3e0b2d4bdcae35b011 Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Thu, 17 Sep 2026 16:33:47 +0800 Subject: [PATCH] refactor(log): log webview location after double colon (#3574) --- .changes/log-webview-double-colon.md | 6 ++++++ plugins/log/src/commands.rs | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changes/log-webview-double-colon.md diff --git a/.changes/log-webview-double-colon.md b/.changes/log-webview-double-colon.md new file mode 100644 index 000000000..f59bf1b52 --- /dev/null +++ b/.changes/log-webview-double-colon.md @@ -0,0 +1,6 @@ +--- +"log": patch +"log-js": patch +--- + +Log webview log target locations after 2 colons instead of 1. (e.g. `webview:myFunction@http://localhost:5173/src/myFile.ts?t=1787480723620:47:4` to `webview::myFunction@http://localhost:5173/src/myFile.ts?t=1787480723620:47:4`) diff --git a/plugins/log/src/commands.rs b/plugins/log/src/commands.rs index c402db76e..e64c30a88 100644 --- a/plugins/log/src/commands.rs +++ b/plugins/log/src/commands.rs @@ -20,9 +20,9 @@ pub fn log( let level = log::Level::from(level); let target = if let Some(location) = location { - format!("{WEBVIEW_TARGET}:{location}") + format!("{WEBVIEW_TARGET}::{location}") } else { - WEBVIEW_TARGET.to_string() + WEBVIEW_TARGET.to_owned() }; let mut builder = RecordBuilder::new();