Frontend/25_02_24/node_modules/@tinyhttp/logger/dist/index.d.ts
2025-02-25 09:55:29 +01:00

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;