mirror of https://gitee.com/bigwinds/arangodb
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:
parent
0fefe62d35
commit
0fc5ee1454
|
@ -4,6 +4,10 @@ v3.5.1 (XXXX-XX-XX)
|
|||
callable with constant arguments. This will allow running queries where all arguments
|
||||
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.
|
||||
|
||||
* Make arangorestore restore data into the `_users` collection last. This is to
|
||||
|
|
|
@ -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`";
|
||||
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()) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue