@lsk4/log
Version:
Yet another logger whitch combines the best features of debug, bunyan, logfmt/logrus, morgan/winston
20 lines (17 loc) • 1.17 kB
TypeScript
import { LoggerLevelType } from '../types.js';
import '@lsk4/colors';
declare const prettyPath: (url: string, defaultUrlPad?: number) => string;
declare const getStatusLevel: (status: number) => LoggerLevelType | null;
declare const prettyStatus: (status: number) => string;
declare const prettyReqId: (reqId: number) => string;
declare const prettyMethod: (method: string) => string;
declare const prettyTime: (ms: number, format?: string) => string | null;
declare const prettySize: (bytes: number, seperator?: string) => string | null;
declare const prettyNs: (names: string[], mainName?: string | null) => string;
declare function prettyMarker(key: string | number): string;
declare const prettyLevel: (level: LoggerLevelType, prefix?: boolean) => string;
declare const prettyContent: (...args: any[]) => any[];
declare const prettyErr: (err: any) => string | null;
declare const getUrlLevel: (req: any) => LoggerLevelType;
declare const prettyUrl: (req: any) => string;
export { getStatusLevel, getUrlLevel, prettyContent, prettyErr, prettyLevel, prettyMarker, prettyMethod, prettyNs, prettyPath, prettyReqId, prettySize, prettyStatus, prettyTime, prettyUrl };