diff --git a/src/legacy/server/logging/log_reporter.js b/src/legacy/server/logging/log_reporter.js index 78176e94fd126..b64f08c1cbbb6 100644 --- a/src/legacy/server/logging/log_reporter.js +++ b/src/legacy/server/logging/log_reporter.js @@ -24,6 +24,14 @@ import LogFormatJson from './log_format_json'; import LogFormatString from './log_format_string'; import { LogInterceptor } from './log_interceptor'; +// NOTE: legacy logger creates a new stream for each new access +// In https://github.com/elastic/kibana/pull/55937 we reach the max listeners +// default limit of 10 for process.stdout which starts a long warning/error +// thrown every time we start the server. +// In order to keep using the legacy logger until we remove it I'm just adding +// a new hard limit here. +process.stdout.setMaxListeners(15); + export function getLoggerStream({ events, config }) { const squeeze = new Squeeze(events); const format = config.json ? new LogFormatJson(config) : new LogFormatString(config);