How to use the stdTimeFunctions function from pino
Find comprehensive JavaScript pino.stdTimeFunctions code examples handpicked from public code repositorys.
177 178 179 180 181 182 183 184 185 186
*/ res.headersSent = true; return pino.stdSerializers.res(res); }, }, timestamp: () => pino.stdTimeFunctions.isoTime(), }, ignoreTrailingSlash: true, }, cors: {
2
11
0
51 52 53 54 55 56 57 58 59 60 61
const logger = pino({ name: 'currencyservice-server', messageKey: 'message', changeLevelName: 'severity', useLevelLabels: true, timestamp: pino.stdTimeFunctions.unixTime }); /** * Helper function that loads a protobuf file.
1
0
0
21 22 23 24 25 26 27 28 29 30
const logger = pino({ name: 'paymentservice', messageKey: 'message', changeLevelName: 'severity', useLevelLabels: true, timestamp: pino.stdTimeFunctions.unixTime, mixin() { const span = tracer.getCurrentSpan(); if (!span) { return {};
1
0
0
15 16 17 18 19 20 21 22 23 24
}, }, customLevels: levels, // our defined levels useOnlyCustomLevels: true, level: 'info', timestamp: pino.stdTimeFunctions.isoTime, }, pino.destination(`${__dirname}/../server.log`) )
0
0
0