const pino = require("pino"); const logger = pino(pino.destination({ dest: 'logs/.log', sync: false })); const environment = process.env.NODE_ENV || 'development'; if (environment == "production") { logger.level = 30 } else { logger.level = 20 } module.exports = logger;