Merge pull request #7968 from overleaf/em-remove-logger-log

Remove logger.log in favour of logger.info

GitOrigin-RevId: e305ae8adf19ecf144cee123b6837f35d5d45bed
This commit is contained in:
Eric Mc Sween
2022-05-16 08:40:25 -04:00
committed by Copybot
parent 10e53f096e
commit f347351a2c
7 changed files with 5 additions and 14 deletions
-4
View File
@@ -41,10 +41,6 @@ const LoggingManager = {
return this.logger.info.apply(this.logger, arguments)
},
log() {
return this.logger.info.apply(this.logger, arguments)
},
error(attributes, message, ...args) {
if (this.ringBuffer !== null && Array.isArray(this.ringBuffer.records)) {
attributes.logBuffer = this.ringBuffer.records.filter(function (record) {
@@ -154,11 +154,6 @@ describe('LoggingManager', function () {
this.logger.err(this.logArgs)
this.bunyanLogger.error.should.have.been.calledWith(this.logArgs)
})
it('should log log', function () {
this.logger.log(this.logArgs)
this.bunyanLogger.info.should.have.been.calledWith(this.logArgs)
})
})
describe('logger.error', function () {
@@ -20,7 +20,7 @@ setInterval(() => {
if (err) {
logger.error({ err }, 'HEALTH CHECK FAILED')
} else {
logger.log('HEALTH CHECK OK')
logger.info('HEALTH CHECK OK')
}
})
}, 1000)
@@ -11,7 +11,7 @@ setInterval(() => {
if (err) {
logger.error({ err }, 'HEALTH CHECK FAILED')
} else {
logger.log('HEALTH CHECK OK')
logger.info('HEALTH CHECK OK')
}
})
}, 1000)
@@ -40,7 +40,7 @@ module.exports = {
throw error
}
this.running = true
logger.log('clsi running in dev mode')
logger.info('clsi running in dev mode')
return (() => {
const result = []
+1 -1
View File
@@ -42,7 +42,7 @@ class RequestLogger {
})
}
const level = res.statusCode >= 500 ? 'err' : 'log'
const level = res.statusCode >= 500 ? 'err' : 'info'
logger[level](
{
req,
@@ -43,7 +43,7 @@ module.exports = {
throw error
}
this.running = true
logger.log('track changes running in dev mode')
logger.info('track changes running in dev mode')
return (() => {
const result = []