Jelajahi Sumber

Merge pull request #7907 from overleaf/em-lower-log-level

Lower the default log level in production to INFO

GitOrigin-RevId: 0b7af54809674704535ffff65ebc366c2fa41214
Eric Mc Sween 4 tahun lalu
induk
melakukan
86dabdd73c

+ 1 - 1
libraries/logger/logging-manager.js

@@ -13,7 +13,7 @@ const LoggingManager = {
     this.isProduction =
       (process.env.NODE_ENV || '').toLowerCase() === 'production'
     this.defaultLevel =
-      process.env.LOG_LEVEL || (this.isProduction ? 'warn' : 'debug')
+      process.env.LOG_LEVEL || (this.isProduction ? 'info' : 'debug')
     this.loggerName = name
     this.logger = bunyan.createLogger({
       name,

+ 2 - 2
libraries/logger/test/unit/logging-manager-tests.js

@@ -90,9 +90,9 @@ describe('LoggingManager', function () {
         delete process.env.NODE_ENV
       })
 
-      it('should default to log level warn', function () {
+      it('should default to log level info', function () {
         this.Bunyan.createLogger.firstCall.args[0].streams[0].level.should.equal(
-          'warn'
+          'info'
         )
       })