mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
remove useUTC deprecation, set default timezone to local (#22696)
* remove useUTC deprecation, set default timezone to local * no-unused-vars * rm set, unset import
This commit is contained in:
parent
cd087e04f3
commit
28f4bfabf8
3 changed files with 8 additions and 13 deletions
|
@ -18,4 +18,10 @@ The following section is re-used in the Installation and Upgrade Guide
|
||||||
////
|
////
|
||||||
// tag::notable-breaking-changes[]
|
// tag::notable-breaking-changes[]
|
||||||
|
|
||||||
|
[float]
|
||||||
|
=== Default logging timezone is now the system's timezone
|
||||||
|
*Details:* In prior releases the timezone used in logs defaulted to UTC. We now use the host machine's timezone by default.
|
||||||
|
|
||||||
|
*Impact:* To restore the previous behavior, in kibana.yml set `logging.timezone: UTC`.
|
||||||
|
|
||||||
// end::notable-breaking-changes[]
|
// end::notable-breaking-changes[]
|
|
@ -152,7 +152,7 @@ export default () => Joi.object({
|
||||||
then: Joi.default(!process.stdout.isTTY),
|
then: Joi.default(!process.stdout.isTTY),
|
||||||
otherwise: Joi.default(true)
|
otherwise: Joi.default(true)
|
||||||
}),
|
}),
|
||||||
timezone: Joi.string().allow(false).default('UTC')
|
timezone: Joi.string()
|
||||||
}).default(),
|
}).default(),
|
||||||
|
|
||||||
ops: Joi.object({
|
ops: Joi.object({
|
||||||
|
|
|
@ -17,9 +17,8 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import _, { set } from 'lodash';
|
import _ from 'lodash';
|
||||||
import { createTransform, Deprecations } from '../../deprecation';
|
import { createTransform, Deprecations } from '../../deprecation';
|
||||||
import { unset } from '../../utils';
|
|
||||||
|
|
||||||
const { rename, unused } = Deprecations;
|
const { rename, unused } = Deprecations;
|
||||||
|
|
||||||
|
@ -46,15 +45,6 @@ const rewriteBasePath = (settings, log) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const loggingTimezone = (settings, log) => {
|
|
||||||
if (_.has(settings, 'logging.useUTC')) {
|
|
||||||
const timezone = settings.logging.useUTC ? 'UTC' : false;
|
|
||||||
set('logging.timezone', timezone);
|
|
||||||
unset(settings, 'logging.useUTC');
|
|
||||||
log(`Config key "logging.useUTC" is deprecated. It has been replaced with "logging.timezone"`);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const deprecations = [
|
const deprecations = [
|
||||||
//server
|
//server
|
||||||
unused('server.xsrf.token'),
|
unused('server.xsrf.token'),
|
||||||
|
@ -66,7 +56,6 @@ const deprecations = [
|
||||||
rename('optimize.lazyProxyTimeout', 'optimize.watchProxyTimeout'),
|
rename('optimize.lazyProxyTimeout', 'optimize.watchProxyTimeout'),
|
||||||
savedObjectsIndexCheckTimeout,
|
savedObjectsIndexCheckTimeout,
|
||||||
rewriteBasePath,
|
rewriteBasePath,
|
||||||
loggingTimezone,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export const transformDeprecations = createTransform(deprecations);
|
export const transformDeprecations = createTransform(deprecations);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue