fix(xo-server/pool.listMissingPatches): don't log errors (#5149)

Work-around to avoid generating too many logs
This commit is contained in:
Pierre Donias 2020-07-10 12:49:37 +02:00 committed by GitHub
parent 99e03b7ce5
commit e1bf68ab38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -14,6 +14,7 @@
- [Proxy] Don't use configured HTTP proxy to connect to XO proxy
- [Backup with proxy] Correctly log job-level errors
- [XO] Fix a few broken documentation links (PR [#5146](https://github.com/vatesfr/xen-orchestra/pull/5146))
- [Patches] Don't log errors related to missing patches listing (PR [#5149](https://github.com/vatesfr/xen-orchestra/pull/5149))
### Packages to release

View File

@ -333,11 +333,16 @@ export default class Api {
data.params
)}) [${ms(Date.now() - startTime)}] =!> ${error}`
this._logger.error(message, {
...data,
duration: Date.now() - startTime,
error: serializedError,
})
// 2020-07-10: Work-around: many kinds of error can be triggered by this
// method, which can generates a lot of logs due to the fact that xo-web
// uses 5s active subscriptions to call it
if (method !== 'pool.listMissingPatches') {
this._logger.error(message, {
...data,
duration: Date.now() - startTime,
error: serializedError,
})
}
if (xo._config.verboseLogsOnErrors) {
log.warn(message, { error })