feat(logs): Improve logs streaming and backlog delivery; add CLI filters and ndjson output
This commit is contained in:
@@ -139,6 +139,18 @@ export interface GetLogsResponse {
|
||||
logs: IProcessLog[];
|
||||
}
|
||||
|
||||
// Subscribe and stream backlog logs
|
||||
export interface LogsSubscribeRequest {
|
||||
id: ProcessId;
|
||||
lines?: number; // number of backlog lines
|
||||
sinceTime?: number; // ms epoch
|
||||
types?: Array<IProcessLog['type']>;
|
||||
}
|
||||
|
||||
export interface LogsSubscribeResponse {
|
||||
ok: boolean;
|
||||
}
|
||||
|
||||
// Start all command
|
||||
export interface StartAllRequest {
|
||||
// No parameters needed
|
||||
@@ -274,6 +286,7 @@ export type IpcMethodMap = {
|
||||
list: { request: ListRequest; response: ListResponse };
|
||||
describe: { request: DescribeRequest; response: DescribeResponse };
|
||||
getLogs: { request: GetLogsRequest; response: GetLogsResponse };
|
||||
'logs:subscribe': { request: LogsSubscribeRequest; response: LogsSubscribeResponse };
|
||||
startAll: { request: StartAllRequest; response: StartAllResponse };
|
||||
stopAll: { request: StopAllRequest; response: StopAllResponse };
|
||||
restartAll: { request: RestartAllRequest; response: RestartAllResponse };
|
||||
|
Reference in New Issue
Block a user