fix(xo-server/pool.listMissingPatches): don't log errors (#5149)
Work-around to avoid generating too many logs
This commit is contained in:
parent
99e03b7ce5
commit
e1bf68ab38
@ -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
|
||||
|
||||
|
@ -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 })
|
||||
|
Loading…
Reference in New Issue
Block a user