fix(xo-server/api): never log pool.listMissingPatches or hosts.stats

This commit is contained in:
Julien Fontanet 2021-05-10 11:35:17 +02:00
parent ab1549f60e
commit 79c3667fd4

View File

@ -354,12 +354,12 @@ export default class Api {
duration: Date.now() - startTime,
error: serializedError,
})
}
if (app.config.get('verboseApiLogsOnErrors')) {
log.warn(message, { error })
} else {
log.warn(`${userName} | ${name}(...) [${ms(Date.now() - startTime)}] =!> ${error}`)
if (app.config.get('verboseApiLogsOnErrors')) {
log.warn(message, { error })
} else {
log.warn(`${userName} | ${name}(...) [${ms(Date.now() - startTime)}] =!> ${error}`)
}
}
const xoError = XAPI_ERROR_TO_XO_ERROR[error.code]