Skip to content

Commit 10cbc38

Browse files
committed
fix: 🐛 Correct key for logwatch json content
1 parent 8ee25cc commit 10cbc38

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

ui/server/utils/logwatch.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { consola } from "consola";
22

3-
type LogLevel = "trace" | "debug" | "info" | "warning" | "error" | "critical";
3+
type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "fatal";
44

55
export interface LogContext {
66
action: string;
@@ -14,7 +14,7 @@ export interface LogContext {
1414
interface LogPayload {
1515
level: LogLevel;
1616
message: string;
17-
content?: string;
17+
raw?: string;
1818
type: "text" | "json";
1919
}
2020

@@ -41,7 +41,7 @@ class Logwatch {
4141
payload = {
4242
level,
4343
message: (message as LogContext).message,
44-
content: JSON.stringify(message),
44+
raw: JSON.stringify(message),
4545
type: "json",
4646
};
4747
} else {
@@ -81,7 +81,7 @@ class Logwatch {
8181

8282
warn(message: unknown): void {
8383
consola.warn(this._format(message));
84-
this._send("warning", message);
84+
this._send("warn", message);
8585
}
8686

8787
error(message: unknown): void {
@@ -91,7 +91,7 @@ class Logwatch {
9191

9292
critical(message: unknown): void {
9393
consola.fatal(this._format(message));
94-
this._send("critical", message);
94+
this._send("fatal", message);
9595
}
9696
}
9797

0 commit comments

Comments
 (0)