How to use the stdSerializers function from pino

Find comprehensive JavaScript pino.stdSerializers code examples handpicked from public code repositorys.

23
24
25
26
27
28
29
30
31
    channel: serializers.channel,
    role: serializers.channel,
    user: serializers.user,
    message: serializers.message,
    feed: serializers.feed,
    error: pino.stdSerializers.err
  },
  enabled: process.env.NODE_ENV !== 'test'
}
fork icon223
star icon873
watch icon29

174
175
176
177
178
179
180
181
182
183
			/**
			 * Required for the statusCode to be logged:
			 * https://github.com/pinojs/pino-std-serializers/blob/901dae44c2b71497cdb0f76f6b5af62588107e3e/lib/res.js#L37
			 */
			res.headersSent = true;
			return pino.stdSerializers.res(res);
		},
	},
	timestamp: () => pino.stdTimeFunctions.isoTime(),
},
fork icon2
star icon11
watch icon0

+ 3 other calls in file

381
382
383
384
385
386
387
388
389
390
  name: 'bitrot',
  base: {}, // Don't want pid and hostname fields.
  level: opts.verbose ? 'trace' : 'warn',
  serializers: {
    err: pino.stdSerializers.err,
    req: pino.stdSerializers.req,
    res: pino.stdSerializers.res
  },
  ...ecsFormat({ apmIntegration: false })
}, pino.destination(1))
fork icon1
star icon0
watch icon0

+ 2 other calls in file

26
27
28
29
30
31
32
33
34
35
  options.serializers.req || stdSerializers.req
);
options.serializers.res = stdSerializers.wrapResponseSerializer(
  options.serializers.res || stdSerializers.res
);
options.serializers.err = options.serializers.err || pino.stdSerializers.err;
if (options.logEvents === undefined) {
  options.logEvents = [
    'onPostStart',
    'onPostStop',
fork icon0
star icon0
watch icon0

+ 2 other calls in file