Merge pull request #7906 from overleaf/em-downgrade-logs

Downgrade all INFO logs to DEBUG

GitOrigin-RevId: 05ed582ef0721fcada059f0ad158565f50feca27
This commit is contained in:
Eric Mc Sween
2022-05-17 08:05:26 +00:00
committed by Copybot
parent efcb06f0df
commit e0d91eaa26
116 changed files with 487 additions and 423 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ if (!module.parent) {
if (error != null) {
throw error
}
return logger.info(`spelling starting up, listening on ${host}:${port}`)
return logger.debug(`spelling starting up, listening on ${host}:${port}`)
})
}
+4 -4
View File
@@ -28,7 +28,7 @@ try {
const oldCache = fs.readFileSync(cacheFsPath)
cache.load(JSON.parse(oldCache))
} catch (error) {
logger.log(
logger.debug(
OError.tag(error, 'could not load the cache file', { cacheFsPath })
)
}
@@ -38,14 +38,14 @@ const cacheDump = setInterval(function () {
const dump = JSON.stringify(cache.dump())
return fs.writeFile(cacheFsPathTmp, dump, function (err) {
if (err != null) {
logger.log(OError.tag(err, 'error writing cache file'))
logger.debug(OError.tag(err, 'error writing cache file'))
fs.unlink(cacheFsPathTmp, () => {})
} else {
fs.rename(cacheFsPathTmp, cacheFsPath, err => {
if (err) {
logger.error(OError.tag(err, 'error renaming cache file'))
} else {
logger.log({ len: dump.length, cacheFsPath }, 'wrote cache file')
logger.debug({ len: dump.length, cacheFsPath }, 'wrote cache file')
}
})
}
@@ -96,7 +96,7 @@ class ASpellRunner {
cache.set(k, v)
}
logger.info(
logger.debug(
{
hits,
total: words.length,
+4 -4
View File
@@ -27,14 +27,14 @@ class ASpellWorker {
'-d',
language,
])
logger.info(
logger.debug(
{ process: this.pipe.pid, lang: this.language },
'starting new aspell worker'
)
metrics.inc('aspellWorker', 1, { status: 'start', method: this.language })
this.pipe.on('exit', () => {
this.state = 'killed'
logger.info(
logger.debug(
{ process: this.pipe.pid, lang: this.language },
'aspell worker has exited'
)
@@ -201,14 +201,14 @@ class ASpellWorker {
}
shutdown(reason) {
logger.info({ process: this.pipe.pid, reason }, 'shutting down')
logger.debug({ process: this.pipe.pid, reason }, 'shutting down')
this.state = 'closing'
this.closeReason = reason
return this.pipe.stdin.end()
}
kill(reason) {
logger.info({ process: this.pipe.pid, reason }, 'killing')
logger.debug({ process: this.pipe.pid, reason }, 'killing')
this.closeReason = reason
if (this.state === 'killed') {
return
+2 -2
View File
@@ -28,7 +28,7 @@ class ASpellWorkerPool {
create(language) {
if (this.PROCESS_POOL.length >= this.MAX_WORKERS) {
logger.log(
logger.debug(
{ maxworkers: this.MAX_WORKERS },
'maximum number of workers already running'
)
@@ -44,7 +44,7 @@ class ASpellWorkerPool {
clearTimeout(worker.idleTimer)
worker.idleTimer = null
}
logger.info(
logger.debug(
{ process: worker.pipe.pid, lang: language },
'removing aspell worker from pool'
)
@@ -26,7 +26,7 @@ module.exports = {
: 0
if (numberOfSuggestions > 10) {
logger.log('health check passed')
logger.debug('health check passed')
res.sendStatus(200)
} else {
logger.err(
@@ -14,7 +14,7 @@ module.exports = {
check(req, res) {
metrics.inc('spelling-check', 0.1)
const { token, wordCount } = extractCheckRequestData(req)
logger.info({ token, wordCount }, 'running check')
logger.debug({ token, wordCount }, 'running check')
SpellingAPIManager.runRequest(token, req.body, function (error, result) {
if (error != null) {
logger.error(