How to use the destination function from pino
Find comprehensive JavaScript pino.destination code examples handpicked from public code repositorys.
GitHub: synzen/MonitoRSS
35 36 37 38 39 40 41 42 43
destination = config.log.destination || undefined pinoConfig.level = config.log.level pinoConfig.prettyPrint = !destination ? prettyPrint : false } return pino(pinoConfig, pino.destination(destination)) } module.exports = createLogger
223
873
29
19 20 21 22 23 24 25 26 27 28 29
const api = require('@opentelemetry/api'); srf.locals = {...srf.locals, otel: {tracer, api}}; const opts = {level: JAMBONES_LOGLEVEL}; const pino = require('pino'); const logger = pino(opts, pino.destination({sync: false})); const {LifeCycleEvents, FS_UUID_SET_NAME} = require('./lib/utils/constants'); const installSrfLocals = require('./lib/utils/install-srf-locals'); installSrfLocals(srf, logger);
27
31
0
+ 2 other calls in file
385 386 387 388 389 390 391 392 393 394
err: pino.stdSerializers.err, req: pino.stdSerializers.req, res: pino.stdSerializers.res }, ...ecsFormat({ apmIntegration: false }) }, pino.destination(1)) const moduleNames = opts._args try { bitrot(moduleNames)
1
0
0
140 141 142 143 144 145 146 147 148 149
// Our wrapping logger level should be 'trace', to pass through all // messages to the wrapped logger. pinoLevel = 'trace' } else { // Log to stdout, the same default as pino itself. dest = pino.destination(1) } const logger = pino({ name: 'elastic-apm-node',
1
0
0
6 7 8 9 10 11 12 13 14 15 16 17
level: (label) => { return { level: label }; }, } }, pino.destination(`${__dirname}/dx-folders.log`) )
0
1
1
+ 4 other calls in file
15 16 17 18 19 20 21
colorize: true, // colorizes the log levelFirst: true, translateTime: "yyyy-dd-mm, h:MM:ss TT", }, }, pino.destination(`${__dirname}/logger.log`) );
0
0
0
23 24 25 26 27 28 29 30 31 32
}, }), }, { level: "debug", stream: pino.destination({ dest: `${process.cwd()}/logs/combined-${today.getFullYear()}.${today.getMonth() + 1}.${today.getDate()}.log`, sync: true, }), },
0
0
0
18 19 20 21 22 23 24
useOnlyCustomLevels: true, level: 'info', timestamp: pino.stdTimeFunctions.isoTime, }, pino.destination(`${__dirname}/../server.log`) )
0
0
0