1
0
Fork 0

Automatically turn values for deprecated startup option parameters `--log.use-microtime` and `--log.use-local-time` into equivalent option values of the new, preferred option `--log.time-format`. (#9914)

This commit is contained in:
Jan 2019-09-05 18:31:40 +02:00 committed by KVS85
parent 0fefe62d35
commit 0fc5ee1454
2 changed files with 19 additions and 0 deletions

View File

@ -4,6 +4,10 @@ v3.5.1 (XXXX-XX-XX)
callable with constant arguments. This will allow running queries where all arguments callable with constant arguments. This will allow running queries where all arguments
for these functions are deterministic and do not depend on loop variables. for these functions are deterministic and do not depend on loop variables.
* Automatically turn values for deprecated startup option parameters
`--log.use-microtime` and `--log.use-local-time` into equivalent option values
of the new, preferred option `--log.time-format`.
* Drop collection action to timeout more quickly to stay on fast lane. * Drop collection action to timeout more quickly to stay on fast lane.
* Make arangorestore restore data into the `_users` collection last. This is to * Make arangorestore restore data into the `_users` collection last. This is to

View File

@ -210,6 +210,21 @@ void LoggerFeature::validateOptions(std::shared_ptr<ProgramOptions> options) {
<< "cannot combine `--log.time-format` with either `--log.use-microtime` or `--log.use-local-time`"; << "cannot combine `--log.time-format` with either `--log.use-microtime` or `--log.use-local-time`";
FATAL_ERROR_EXIT(); FATAL_ERROR_EXIT();
} }
// convert the deprecated options into the new timeformat
if (options->processingResult().touched("log.use-local-time")) {
_timeFormatString = "local-datestring";
// the following call ensures the string is actually valid.
// if not valid, the following call will throw an exception and
// abort the startup
LogTimeFormats::formatFromName(_timeFormatString);
} else if (options->processingResult().touched("log.use-microtime")) {
_timeFormatString = "timestamp-micros";
// the following call ensures the string is actually valid.
// if not valid, the following call will throw an exception and
// abort the startup
LogTimeFormats::formatFromName(_timeFormatString);
}
if (!_fileMode.empty()) { if (!_fileMode.empty()) {
try { try {