From f0a3eeeb3222c2a64921a685cae1f18b895fb9b3 Mon Sep 17 00:00:00 2001 From: Eric Mc Sween Date: Mon, 16 May 2022 08:40:25 -0400 Subject: [PATCH] Merge pull request #7968 from overleaf/em-remove-logger-log Remove logger.log in favour of logger.info GitOrigin-RevId: e305ae8adf19ecf144cee123b6837f35d5d45bed --- libraries/logger/logging-manager.js | 4 ---- libraries/logger/test/unit/logging-manager-tests.js | 5 ----- libraries/redis-wrapper/test/scripts/cluster/cluster.js | 2 +- libraries/redis-wrapper/test/scripts/standalone.js | 2 +- services/clsi/test/acceptance/js/helpers/ClsiApp.js | 2 +- services/filestore/app/js/RequestLogger.js | 2 +- .../test/acceptance/js/helpers/TrackChangesApp.js | 2 +- 7 files changed, 5 insertions(+), 14 deletions(-) diff --git a/libraries/logger/logging-manager.js b/libraries/logger/logging-manager.js index 705a8ff3b3..6c2d7502a5 100644 --- a/libraries/logger/logging-manager.js +++ b/libraries/logger/logging-manager.js @@ -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) { diff --git a/libraries/logger/test/unit/logging-manager-tests.js b/libraries/logger/test/unit/logging-manager-tests.js index 6539693268..146932fd85 100644 --- a/libraries/logger/test/unit/logging-manager-tests.js +++ b/libraries/logger/test/unit/logging-manager-tests.js @@ -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 () { diff --git a/libraries/redis-wrapper/test/scripts/cluster/cluster.js b/libraries/redis-wrapper/test/scripts/cluster/cluster.js index 252b96c915..58d6c79037 100644 --- a/libraries/redis-wrapper/test/scripts/cluster/cluster.js +++ b/libraries/redis-wrapper/test/scripts/cluster/cluster.js @@ -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) diff --git a/libraries/redis-wrapper/test/scripts/standalone.js b/libraries/redis-wrapper/test/scripts/standalone.js index 4ea2ffea7e..e28d5f5f0b 100644 --- a/libraries/redis-wrapper/test/scripts/standalone.js +++ b/libraries/redis-wrapper/test/scripts/standalone.js @@ -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) diff --git a/services/clsi/test/acceptance/js/helpers/ClsiApp.js b/services/clsi/test/acceptance/js/helpers/ClsiApp.js index cffc54bc58..d0394453bd 100644 --- a/services/clsi/test/acceptance/js/helpers/ClsiApp.js +++ b/services/clsi/test/acceptance/js/helpers/ClsiApp.js @@ -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 = [] diff --git a/services/filestore/app/js/RequestLogger.js b/services/filestore/app/js/RequestLogger.js index af4b4c787f..abeceee618 100644 --- a/services/filestore/app/js/RequestLogger.js +++ b/services/filestore/app/js/RequestLogger.js @@ -42,7 +42,7 @@ class RequestLogger { }) } - const level = res.statusCode >= 500 ? 'err' : 'log' + const level = res.statusCode >= 500 ? 'err' : 'info' logger[level]( { req, diff --git a/services/track-changes/test/acceptance/js/helpers/TrackChangesApp.js b/services/track-changes/test/acceptance/js/helpers/TrackChangesApp.js index 3abf96c46d..0658e68687 100644 --- a/services/track-changes/test/acceptance/js/helpers/TrackChangesApp.js +++ b/services/track-changes/test/acceptance/js/helpers/TrackChangesApp.js @@ -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 = []