Skip to content

Commit

Permalink
Please I18n tests and remove duplicate info
Browse files Browse the repository at this point in the history
  • Loading branch information
watson committed Oct 7, 2021
1 parent 1aa7c6d commit d21c627
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 26 deletions.
22 changes: 11 additions & 11 deletions src/core/server/config/deprecation/core_deprecations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ describe('core deprecations', () => {
});
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"logging.events.ops\\" has been deprecated and will be removed in 8.0. To access ops data moving forward, please enable debug logs for the \\"metrics.ops\\" context in your logging configuration. For more details, see https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx",
"\\"logging.events.ops\\" has been deprecated and will be removed in 8.0. To access ops data moving forward, please enable debug logs for the \\"metrics.ops\\" context in your logging configuration.",
]
`);
});
Expand All @@ -280,7 +280,7 @@ describe('core deprecations', () => {
});
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"logging.events.request\\" has been deprecated and will be removed in 8.0. To access request data moving forward, please enable debug logs for the \\"http.server.response\\" context in your logging configuration. For more details, see https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx",
"\\"logging.events.request\\" has been deprecated and will be removed in 8.0. To access request data moving forward, please enable debug logs for the \\"http.server.response\\" context in your logging configuration.",
]
`);
});
Expand All @@ -293,7 +293,7 @@ describe('core deprecations', () => {
});
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"logging.events.response\\" has been deprecated and will be removed in 8.0. To access response data moving forward, please enable debug logs for the \\"http.server.response\\" context in your logging configuration. For more details, see https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx",
"\\"logging.events.response\\" has been deprecated and will be removed in 8.0. To access response data moving forward, please enable debug logs for the \\"http.server.response\\" context in your logging configuration.",
]
`);
});
Expand All @@ -306,7 +306,7 @@ describe('core deprecations', () => {
});
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"logging.timezone\\" has been deprecated and will be removed in 8.0. To set the timezone moving forward, please add a timezone date modifier to the log pattern in your logging configuration. For more details, see https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx",
"\\"logging.timezone\\" has been deprecated and will be removed in 8.0. To set the timezone moving forward, please add a timezone date modifier to the log pattern in your logging configuration.",
]
`);
});
Expand All @@ -319,7 +319,7 @@ describe('core deprecations', () => {
});
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"logging.dest\\" has been deprecated and will be removed in 8.0. To set the destination moving forward, you can use the \\"console\\" appender in your logging configuration or define a custom one. For more details, see https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx",
"\\"logging.dest\\" has been deprecated and will be removed in 8.0. To set the destination moving forward, you can use the \\"console\\" appender in your logging configuration or define a custom one.",
]
`);
});
Expand All @@ -329,7 +329,7 @@ describe('core deprecations', () => {
});
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"logging.dest\\" has been deprecated and will be removed in 8.0. To set the destination moving forward, you can use the \\"console\\" appender in your logging configuration or define a custom one. For more details, see https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx",
"\\"logging.dest\\" has been deprecated and will be removed in 8.0. To set the destination moving forward, you can use the \\"console\\" appender in your logging configuration or define a custom one.",
]
`);
});
Expand Down Expand Up @@ -375,7 +375,7 @@ describe('core deprecations', () => {
});
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"logging.json\\" has been deprecated and will be removed in 8.0. To specify log message format moving forward, you can configure the \\"appender.layout\\" property for every custom appender in your logging configuration. There is currently no default layout for custom appenders and each one must be declared explicitly. For more details, see https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx",
"\\"logging.json\\" has been deprecated and will be removed in 8.0. To specify log message format moving forward, you can configure the \\"appender.layout\\" property for every custom appender in your logging configuration. There is currently no default layout for custom appenders and each one must be declared explicitly.",
]
`);
});
Expand All @@ -388,7 +388,7 @@ describe('core deprecations', () => {
});
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"logging.rotate\\" and sub-options have been deprecated and will be removed in 8.0. Moving forward, you can enable log rotation using the \\"rolling-file\\" appender for a logger in your logging configuration. For more details, see https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx#rolling-file-appender",
"\\"logging.rotate\\" and sub-options have been deprecated and will be removed in 8.0. Moving forward, you can enable log rotation using the \\"rolling-file\\" appender for a logger in your logging configuration.",
]
`);
});
Expand All @@ -399,7 +399,7 @@ describe('core deprecations', () => {
});
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"logging.rotate\\" and sub-options have been deprecated and will be removed in 8.0. Moving forward, you can enable log rotation using the \\"rolling-file\\" appender for a logger in your logging configuration. For more details, see https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx#rolling-file-appender",
"\\"logging.rotate\\" and sub-options have been deprecated and will be removed in 8.0. Moving forward, you can enable log rotation using the \\"rolling-file\\" appender for a logger in your logging configuration.",
]
`);
});
Expand All @@ -410,7 +410,7 @@ describe('core deprecations', () => {
});
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"logging.rotate\\" and sub-options have been deprecated and will be removed in 8.0. Moving forward, you can enable log rotation using the \\"rolling-file\\" appender for a logger in your logging configuration. For more details, see https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx#rolling-file-appender",
"\\"logging.rotate\\" and sub-options have been deprecated and will be removed in 8.0. Moving forward, you can enable log rotation using the \\"rolling-file\\" appender for a logger in your logging configuration.",
]
`);
});
Expand All @@ -421,7 +421,7 @@ describe('core deprecations', () => {
});
expect(messages).toMatchInlineSnapshot(`
Array [
"\\"logging.rotate\\" and sub-options have been deprecated and will be removed in 8.0. Moving forward, you can enable log rotation using the \\"rolling-file\\" appender for a logger in your logging configuration. For more details, see https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx#rolling-file-appender",
"\\"logging.rotate\\" and sub-options have been deprecated and will be removed in 8.0. Moving forward, you can enable log rotation using the \\"rolling-file\\" appender for a logger in your logging configuration.",
]
`);
});
Expand Down
22 changes: 7 additions & 15 deletions src/core/server/config/deprecation/core_deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ const opsLoggingEventDeprecation: ConfigDeprecation = (
defaultMessage:
'"logging.events.ops" has been deprecated and will be removed ' +
'in 8.0. To access ops data moving forward, please enable debug logs for the ' +
'"metrics.ops" context in your logging configuration. For more details, see ' +
`https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx`,
'"metrics.ops" context in your logging configuration.',
}),
correctiveActions: {
manualSteps: [
Expand Down Expand Up @@ -232,8 +231,7 @@ const requestLoggingEventDeprecation: ConfigDeprecation = (
defaultMessage:
'"logging.events.request" has been deprecated and will be removed ' +
'in 8.0. To access request data moving forward, please enable debug logs for the ' +
'"http.server.response" context in your logging configuration. For more details, see ' +
`https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx`,
'"http.server.response" context in your logging configuration.',
}),
correctiveActions: {
manualSteps: [
Expand Down Expand Up @@ -263,8 +261,7 @@ const responseLoggingEventDeprecation: ConfigDeprecation = (
defaultMessage:
'"logging.events.response" has been deprecated and will be removed ' +
'in 8.0. To access response data moving forward, please enable debug logs for the ' +
'"http.server.response" context in your logging configuration. For more details, see ' +
`https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx`,
'"http.server.response" context in your logging configuration.',
}),
correctiveActions: {
manualSteps: [
Expand Down Expand Up @@ -294,8 +291,7 @@ const timezoneLoggingDeprecation: ConfigDeprecation = (
defaultMessage:
'"logging.timezone" has been deprecated and will be removed ' +
'in 8.0. To set the timezone moving forward, please add a timezone date modifier to the log pattern ' +
'in your logging configuration. For more details, see ' +
`https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx`,
'in your logging configuration.',
}),
correctiveActions: {
manualSteps: [
Expand Down Expand Up @@ -325,8 +321,7 @@ const destLoggingDeprecation: ConfigDeprecation = (
defaultMessage:
'"logging.dest" has been deprecated and will be removed ' +
'in 8.0. To set the destination moving forward, you can use the "console" appender ' +
'in your logging configuration or define a custom one. For more details, see ' +
`https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx`,
'in your logging configuration or define a custom one.',
}),
correctiveActions: {
manualSteps: [
Expand Down Expand Up @@ -448,9 +443,7 @@ const jsonLoggingDeprecation: ConfigDeprecation = (
'"logging.json" has been deprecated and will be removed ' +
'in 8.0. To specify log message format moving forward, ' +
'you can configure the "appender.layout" property for every custom appender in your logging configuration. ' +
'There is currently no default layout for custom appenders and each one must be declared explicitly. ' +
'For more details, see ' +
`https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx`,
'There is currently no default layout for custom appenders and each one must be declared explicitly.',
}),
correctiveActions: {
manualSteps: [
Expand Down Expand Up @@ -480,8 +473,7 @@ const logRotateDeprecation: ConfigDeprecation = (
defaultMessage:
'"logging.rotate" and sub-options have been deprecated and will be removed in 8.0. ' +
'Moving forward, you can enable log rotation using the "rolling-file" appender for a logger ' +
'in your logging configuration. For more details, see ' +
`https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#rolling-file-appender`,
'in your logging configuration.',
}),
correctiveActions: {
manualSteps: [
Expand Down

0 comments on commit d21c627

Please sign in to comment.