@httpc/kit
Version:
httpc toolbox for building function-based API with minimal code and end-to-end type safety
20 lines (19 loc) • 863 B
TypeScript
import winston, { transport } from "winston";
import { ILogger, ILogService, LogLevel } from "../types";
type WinstonProperties = {
level?: LogLevel;
[key: string]: any;
};
type FactoryOption<T> = T | ((label: string, properties?: WinstonProperties) => T);
export type WinstonLogServiceOptions = {
level?: FactoryOption<LogLevel>;
properties?: FactoryOption<WinstonProperties>;
transports?: FactoryOption<transport | transport[]>;
};
export declare class WinstonLogService implements ILogService {
protected options?: WinstonLogServiceOptions | undefined;
constructor(options?: WinstonLogServiceOptions | undefined);
createLogger(label: string, properties?: WinstonProperties): ILogger;
protected _createConsoleFormat(label: string, properties?: (label: string) => any): winston.Logform.Format;
}
export {};