/** * Contains all methods a request / response can have */ export declare const METHOD: { /** * Indicates log information */ readonly LOG: 1; /** * Indicates that it needs flushing i.e write the remaining stuff */ readonly FLUSH: 2; /** * Indicates that the stream opened needs to be closed / re opened typically used for file rotation */ readonly RELOAD: 3; /** * Close the child process */ readonly SHUTDOWN: 4; }; /** * Contains a set of valid methods */ export declare const VALID_METHODS: Set; /** * What value the method can be for a request */ export type MethodType = (typeof METHOD)[keyof typeof METHOD]; /** * Contains all the levels logs can be indicating there importance */ export declare const LOG_LEVEL: { /** * Used for information */ readonly INFO: 1; /** * Used for warning */ readonly WARN: 2; /** * Used for errors */ readonly ERROR: 3; /** * Used for debug */ readonly DEBUG: 4; /** * Used for fatal */ readonly FATAL: 5; }; /** * Contains a set of valid log levels */ export declare const VALID_LOG_LEVELS: Set; /** * What type the level can be for a request */ export type LogLevelType = (typeof LOG_LEVEL)[keyof typeof LOG_LEVEL]; /** * Represents a request message object used to send messages to the log stream. */ export type RequestLog = { /** * Request identifier. Only present when method is not "LOG". */ id?: number; /** * Operation method (e.g., LOG, FLUSH, RELOAD) */ method: MethodType; /** * Log severity level (e.g., INFO, WARN, ERROR). Only present when method is not "LOG". */ level?: LogLevelType; /** * Message payload. */ payload: string; }; /** * Represents a response message object used to send responses from the log stream. */ export type LogResponse = { /** * Request identifier */ id: number; /** * Operation method (e.g., LOG, FLUSH, RELOAD) */ method: MethodType; /** * Log severity level (e.g., INFO, WARN, ERROR) */ level: LogLevelType; /** * Whether the request succeeded (true) or failed (false) */ success: boolean; }; //# sourceMappingURL=protocol.d.ts.map