diff --git a/services/logging.js b/services/logging.js index c01951d..5aceee1 100644 --- a/services/logging.js +++ b/services/logging.js @@ -1,4 +1,12 @@ const pino = require("pino"); const logger = pino(pino.destination({ dest: 'logs/.log', sync: false })); +const environment = process.env.NODE_ENV || 'development'; +console.log(process.env.NODE_ENV); +if (environment == "production") { + logger.level = 30 +} else { + logger.level = 20 +} + module.exports = logger; \ No newline at end of file