diff --git a/src/cli_plugin/lib/log_warnings.js b/src/cli_plugin/lib/log_warnings.js index 35d3bd51bc4b..b92b049a0baa 100644 --- a/src/cli_plugin/lib/log_warnings.js +++ b/src/cli_plugin/lib/log_warnings.js @@ -1,5 +1,11 @@ export default function (settings, logger) { - process.on('warning', (warning) => { + process.on('warning', warning => { + // deprecation warnings do no reflect a current problem for + // the user and therefor should be filtered out. + if (warning.name === 'DeprecationWarning') { + return; + } + logger.error(warning); }); } diff --git a/src/server/warnings/index.js b/src/server/warnings/index.js index 2e2a9348835d..780124280303 100644 --- a/src/server/warnings/index.js +++ b/src/server/warnings/index.js @@ -1,5 +1,11 @@ export default function (kbnServer, server) { process.on('warning', (warning) => { + // deprecation warnings do no reflect a current problem for + // the user and therefor should be filtered out. + if (warning.name === 'DeprecationWarning') { + return; + } + server.log(['warning', 'process'], warning); }); }