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

Lower the default log level in production to INFO

GitOrigin-RevId: 0b7af54809674704535ffff65ebc366c2fa41214
This commit is contained in:
Eric Mc Sween 2022-05-16 08:38:27 -04:00 committed by Copybot
parent e0d91eaa26
commit 86dabdd73c
2 changed files with 3 additions and 3 deletions

View file

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

View file

@ -90,9 +90,9 @@ describe('LoggingManager', function () {
delete process.env.NODE_ENV 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( this.Bunyan.createLogger.firstCall.args[0].streams[0].level.should.equal(
'warn' 'info'
) )
}) })