Skip to content

Commit

Permalink
Surface debug level deprecation logs on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolf committed Jan 24, 2022
1 parent 98c7892 commit 462e093
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ describe('migration from 7.7.2-xpack with 100k objects', () => {
loggers: [
{
name: 'root',
level: 'info',
appenders: ['file'],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ function createRoot() {
loggers: [
{
name: 'root',
level: 'info',
appenders: ['file'],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ function createRoot() {
loggers: [
{
name: 'root',
level: 'info',
appenders: ['file'],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ function createRoot() {
loggers: [
{
name: 'root',
level: 'info',
appenders: ['file'],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ function createRoot(options: { maxBatchSizeBytes?: number }) {
loggers: [
{
name: 'root',
level: 'info',
appenders: ['file'],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ function createRoot(options: { maxBatchSizeBytes?: number }) {
loggers: [
{
name: 'root',
level: 'info',
appenders: ['file'],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ function createRoot() {
{
name: 'root',
appenders: ['file'],
level: 'info',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ function createRoot() {
{
name: 'root',
appenders: ['file'],
level: 'info',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ describe('migrating from 7.3.0-xpack which used v1 migrations', () => {
{
name: 'root',
appenders: ['file'],
level: 'info',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ describe('migrating from the same Kibana version that used v1 migrations', () =>
{
name: 'root',
appenders: ['file'],
level: 'info',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ function createRoot({ logFileName, hosts }: RootConfig) {
{
name: 'root',
appenders: ['file'],
level: 'info',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ async function createRoot({ logFileName }: CreateRootConfig) {
{
name: 'root',
appenders: ['file'],
level: 'info',
},
{
name: 'savedobjects-service',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ function createRoot() {
loggers: [
{
name: 'root',
level: 'info',
appenders: ['file'],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function createRoot() {
loggers: [
{
name: 'root',
level: 'info',
appenders: ['file'],
},
],
Expand Down
19 changes: 19 additions & 0 deletions src/core/test_helpers/kbn_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,25 @@ export function createRootWithCorePlugins(settings = {}, cliArgs: Partial<CliArg
username: kibanaServerTestUser.username,
password: kibanaServerTestUser.password,
},
// Log ES deprecations to surface these in CI
logging: {
loggers: [
{
name: 'root',
level: 'error',
appenders: ['console'],
},
{
name: 'elasticsearch.deprecation',
level: 'all',
appenders: ['deprecation'],
},
],
appenders: {
deprecation: { type: 'console', layout: { type: 'json' } },
console: { type: 'console', layout: { type: 'pattern' } },
},
},
// createRootWithSettings sets default value to "true", so undefined should be threatened as "true".
...(cliArgs.oss === false
? {
Expand Down
1 change: 1 addition & 0 deletions test/common/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export default function () {
'--logging.appenders.deprecation.type=console',
'--logging.appenders.deprecation.layout.type=json',
'--logging.loggers[0].name=elasticsearch.deprecation',
'--logging.loggers[0].level=all',
'--logging.loggers[0].appenders[0]=deprecation',
],
},
Expand Down

0 comments on commit 462e093

Please sign in to comment.