Skip to content

Commit

Permalink
Merge pull request #2353 from balena-os/log-message-typing
Browse files Browse the repository at this point in the history
Improve log message typing
  • Loading branch information
Page- authored Jul 17, 2024
2 parents ef8414b + 4976578 commit b7ca7fb
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/logging/log-backend.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
export type LogMessage = Dictionary<any>;
type BaseLogMessage = {
message: string;
isStdErr?: boolean;
timestamp?: number;
};
export type LogMessage = BaseLogMessage &
(
| {
serviceId?: number;
imageId?: number;
isSystem?: false;
}
| {
message: string;
isSystem: true;
}
);

export abstract class LogBackend {
public unmanaged: boolean;
Expand Down

0 comments on commit b7ca7fb

Please sign in to comment.