UNPKG

typescript-logging

Version:

Library for logging, written in typescript, can be used by normal es5+ javascript as well.

22 lines (18 loc) 438 B
/** * LogData for a Logger message. */ export interface LogData { /** * Message to log. */ msg: string; /** * Optional additional data, by default JSON.stringify(..) is used to log it in addition to the message. */ data?: any; /** * If present, and data is set - this lambda is used instead of JSON.stringify(..). Must return data as string. * @param data Data to format */ ds?(data: any): string; }