add: a logger utils
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export type LogLevel = "debug" | "info" | "warn" | "error";
|
||||
|
||||
export type LogContext = Record<string, unknown>;
|
||||
|
||||
export interface LogEntry {
|
||||
timestamp: string;
|
||||
level: LogLevel;
|
||||
scope: string;
|
||||
message: string;
|
||||
context?: LogContext;
|
||||
}
|
||||
|
||||
export interface LoggerConfig {
|
||||
minLevel: LogLevel;
|
||||
}
|
||||
Reference in New Issue
Block a user