Merge branch 'dev' into next

This commit is contained in:
Lucas Nogueira
2023-05-02 13:47:10 -03:00
8 changed files with 86 additions and 20 deletions
+6 -1
View File
@@ -52,10 +52,15 @@ async function log(
const { file, line, ...keyValues } = options ?? {};
let location = filtered?.[0]?.filter((v) => v.length > 0).join("@");
if (location === "Error") {
location = "webview::unknown";
}
await invoke("plugin:log|log", {
level,
message,
location: filtered?.[0]?.filter((v) => v.length > 0).join("@"),
location,
file,
line,
keyValues,
+3 -3
View File
@@ -178,8 +178,8 @@ fn log(
let location = location.unwrap_or("webview");
let mut builder = RecordBuilder::new();
builder
.target(location)
.level(level.into())
.target(location)
.file(file)
.line(line);
@@ -251,8 +251,8 @@ impl Builder {
out.finish(format_args!(
"{}[{}][{}] {}",
timezone_strategy.get_now().format(&format).unwrap(),
record.target(),
record.level(),
record.target(),
message
))
});
@@ -311,8 +311,8 @@ impl Builder {
out.finish(format_args!(
"{}[{}][{}] {}",
timezone_strategy.get_now().format(&format).unwrap(),
record.target(),
colors.color(record.level()),
record.target(),
message
))
})