UNPKG

better-logging

Version:

better-logging is a drop in replacement for the default logging methods of node.js

25 lines (24 loc) 840 B
import { DecoratedInstance } from '../lib/interfaces/decoratedInstance'; import { LogFunction } from '../lib/types/logFunction'; import { Color } from '../lib/types/color'; export interface IMiddlewareConfigProperty { order?: number; show?: boolean; color?: Color; } export interface IConfig { method: IMiddlewareConfigProperty; ip: IMiddlewareConfigProperty; path: IMiddlewareConfigProperty; body: IMiddlewareConfigProperty; header: IMiddlewareConfigProperty; } interface IExpressRequest { ip: string; path: string; body: string; method: string; headers: object; } export declare const expressMiddleware: (hostObjOrLogFunction: DecoratedInstance | LogFunction, config?: Partial<IConfig>) => (req: IExpressRequest, res: unknown, next: (...args: unknown[]) => unknown) => void; export {};