mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-22 05:23:02 +00:00
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:
parent
86dabdd73c
commit
f0a3eeeb32
7 changed files with 5 additions and 14 deletions
|
@ -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 = []
|
||||
|
|
|
@ -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 = []
|
||||
|
|
Loading…
Reference in a new issue