How to use the pino-std-serializers.mapHttpResponse function in pino-std-serializers

To help you get started, we’ve selected a few pino-std-serializers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pinojs / pino / lib / tools.js View on Github external
return function LOG (o, ...n) {
    if (typeof o === 'object' && o !== null) {
      if (o.method && o.headers && o.socket) {
        o = mapHttpRequest(o)
      } else if (typeof o.setHeader === 'function') {
        o = mapHttpResponse(o)
      this[writeSym](o, format(null, n, this[formatOptsSym]), z)
    } else this[writeSym](null, format(o, n, this[formatOptsSym]), z)