24 lines
630 B
TypeScript
24 lines
630 B
TypeScript
|
import { ServerResponse as Response, IncomingMessage as Request } from 'node:http';
|
||
|
export declare enum LogLevel {
|
||
|
error = "error",
|
||
|
warn = "warn",
|
||
|
trace = "trace",
|
||
|
info = "info",
|
||
|
log = "log"
|
||
|
}
|
||
|
export interface LoggerOptions {
|
||
|
methods?: string[];
|
||
|
output?: {
|
||
|
color: boolean;
|
||
|
filename?: string;
|
||
|
callback: (string: string) => void;
|
||
|
level?: LogLevel;
|
||
|
};
|
||
|
timestamp?: boolean | {
|
||
|
format?: string;
|
||
|
};
|
||
|
emoji?: boolean;
|
||
|
ip?: boolean;
|
||
|
}
|
||
|
export declare const logger: (options?: LoggerOptions) => (req: Request, res: Response, next?: () => void) => void;
|