Skip to content

Commit bb2197b

Browse files
sshaderConvex, Inc.
authored and
Convex, Inc.
committed
Make the dashboard handle structured log lines (#24131)
The dashboard version of get-convex/convex#24129. Note that we still allow unstructured log lines too. There should be no user visible changes here. GitOrigin-RevId: 731248c2c930d35b641f209b07dd21d808513578
1 parent d0e4caf commit bb2197b

File tree

1 file changed

+12
-2
lines changed
  • npm-packages/system-udfs/convex/_system/frontend

1 file changed

+12
-2
lines changed

Diff for: npm-packages/system-udfs/convex/_system/frontend/common.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,22 @@ export type UdfWrite = {
1717
source: string;
1818
};
1919

20+
export type LogLevel = "LOG" | "DEBUG" | "INFO" | "WARN" | "ERROR";
21+
22+
export type StructuredLogLine = {
23+
messages: string[];
24+
level: LogLevel;
25+
timestamp: number;
26+
isTruncated: boolean;
27+
};
28+
export type LogLine = string | StructuredLogLine;
29+
2030
export type FunctionExecutionCompletion = {
2131
kind: "Completion";
2232
identifier: string;
2333
udfType: UdfType;
2434
arguments: string[];
25-
logLines: string[];
35+
logLines: LogLine[];
2636
// Unix timestamp (in seconds)
2737
timestamp: number;
2838

@@ -47,7 +57,7 @@ export type FunctionExecutionProgess = {
4757
udfType: UdfType;
4858
// Unix timestamp (in seconds)
4959
timestamp: number;
50-
logLines: string[];
60+
logLines: LogLine[];
5161
requestId: string;
5262
executionId: string;
5363
};

0 commit comments

Comments
 (0)