Skip to content

Latest commit

 

History

History
26 lines (24 loc) · 449 Bytes

File metadata and controls

26 lines (24 loc) · 449 Bytes

implement another logger (one line pretty with objects as JSON)

/**

  • some simple logger */ const logger = pino({ level: 'debug', transport: { target: 'pino-pretty', options: { colorize: true, singleLine: true } }, hooks: { logMethod(args, method, level) { const message = args .map((arg) => typeof arg === 'object' ? JSON.stringify(arg) : String(arg) ) .join(' ') method.apply(this, [message]) } } })