diff --git a/CHANGELOG b/CHANGELOG index 269dffecf6..11c852393b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,12 +3,12 @@ devel * added "--log.ids" option to arangod - The default value for this option is `false`. Setting the option to `true` - will embed unique ids into all log messages generated in arangod code. This - allows for easy access to the location in the source code from which the - message originates. This should help customers to configure custom - monitoring/alerting based on specific log id occurrences and will also be - helpful for support and development in identifying problems. + The default value for this option is `true`. Setting the option to `false` + will prevent embedding unique log ids into all log messages generated by + ArangoDB C++ code. The unique ids allow for easy access to the location in + the source code from which a message originates. This should help customers + to configure custom monitoring/alerting based on specific log id occurrences + and will also be helpful for support and development in identifying problems. * fixed issue #8294: wrong equals behaviour on arrays with ArangoSearch diff --git a/Documentation/Books/Manual/ReleaseNotes/NewFeatures35.md b/Documentation/Books/Manual/ReleaseNotes/NewFeatures35.md index 8b94def204..eff6b61446 100644 --- a/Documentation/Books/Manual/ReleaseNotes/NewFeatures35.md +++ b/Documentation/Books/Manual/ReleaseNotes/NewFeatures35.md @@ -20,6 +20,13 @@ reduce memory usage and, for some queries, also execution time for the sorting. If the optimization is applied, it will show as "sort-limit" rule in the query execution plan. +### Index Hints in AQL + +Users may now take advantage of the `indexHint` inline query option to override +the internal optimizer decision regarding which index to use to serve content +from a given collection. The index hint works with the named indices feature +above, making it easy to specify which index to use. + ### Sorted primary index (RocksDB engine) The query optimizer can now make use of the sortedness of primary indexes if the @@ -280,12 +287,37 @@ name _cannot_ be changed after index creation. No two indices on the same collection may share the same name, but two indices on different collections may. -### Index Hints in AQL +### ID values in log messages + +By default, ArangoDB and its client tools now show a 5 digit unique ID value in +any of their log messages, e.g. + + 2019-03-25T21:23:19Z [8144] INFO [cf3f4] ArangoDB (version 3.5.0 enterprise [linux]) is ready for business. Have fun!. + +In this message, the `cf3f4` is the message's unique ID value. ArangoDB users can +use this ID to build custom monitoring or alerting based on specific log ID values. +Existing log ID values are supposed to stay constant in future releases of arangod. + +Additionally the unique log ID values can be used by the ArangoDB support to find +out which component of the product exactly generated a log message. The IDs also +make disambiguation of identical log messages easier. + +The presence of these ID values in log messages may confuse custom log message filtering +or routing mechanisms that parse log messages and that rely on the old log message +format. + +This can be fixed adjusting any existing log message parsers and making them aware +of the ID values. The ID values are always 5 byte strings, consisting of the characters +`[0-9a-f]`. ID values are placed directly behind the log level (e.g. `INFO`) for +general log messages that do not contain a log topic, and directly behind the log +topic for messages that contain a topic, e.g. + + 2019-03-25T21:23:19Z [8144] INFO [cf3f4] ArangoDB (version 3.5.0 enterprise [linux]) is ready for business. Have fun!. + 2019-03-25T21:23:16Z [8144] INFO {authentication} [3844e] Authentication is turned on (system only), authentication for unix sockets is turned on + +Alternatively, the log IDs can be suppressed in all log messages by setting the startup +option `--log.ids false` when starting arangod or any of the client tools. -Users may now take advantage of the `indexHint` inline query option to override -the internal optimizer decision regarding which index to use to serve content -from a given collection. The index hint works with the named indices feature -above, making it easy to specify which index to use. Internal -------- diff --git a/Documentation/Books/Manual/ReleaseNotes/UpgradingChanges35.md b/Documentation/Books/Manual/ReleaseNotes/UpgradingChanges35.md index c0f6b8e915..ed5dd66828 100644 --- a/Documentation/Books/Manual/ReleaseNotes/UpgradingChanges35.md +++ b/Documentation/Books/Manual/ReleaseNotes/UpgradingChanges35.md @@ -6,6 +6,34 @@ upgrading to ArangoDB 3.5, and adjust any client programs if necessary. The following incompatible changes have been made in ArangoDB 3.5: +ID values in log messages +------------------------- + +By default, ArangoDB and its client tools now show a 5 digit unique ID value in +any of their log messages, e.g. + + 2019-03-25T21:23:19Z [8144] INFO [cf3f4] ArangoDB (version 3.5.0 enterprise [linux]) is ready for business. Have fun!. + +In this message, the `cf3f4` is the message's unique ID value. ArangoDB users can +use this ID to build custom monitoring or alerting based on specific log ID values. + +The presence of these ID values in log messages may confuse custom log message filtering +or routing mechanisms that parse log messages and that rely on the old log message +format. + +This can be fixed adjusting any existing log message parsers and making them aware +of the ID values. The ID values are always 5 byte strings, consisting of the characters +`[0-9a-f]`. ID values are placed directly behind the log level (e.g. `INFO`) for +general log messages that do not contain a log topic, and directly behind the log +topic for messages that contain a topic, e.g. + + 2019-03-25T21:23:19Z [8144] INFO [cf3f4] ArangoDB (version 3.5.0 enterprise [linux]) is ready for business. Have fun!. + 2019-03-25T21:23:16Z [8144] INFO {authentication} [3844e] Authentication is turned on (system only), authentication for unix sockets is turned on + +Alternatively, the log IDs can be suppressed in all log messages by setting the startup +option `--log.ids false` when starting arangod or any of the client tools. + + Startup options --------------- diff --git a/lib/Logger/LoggerFeature.cpp b/lib/Logger/LoggerFeature.cpp index 096c600249..f46a78f3d2 100644 --- a/lib/Logger/LoggerFeature.cpp +++ b/lib/Logger/LoggerFeature.cpp @@ -89,7 +89,9 @@ void LoggerFeature::collectOptions(std::shared_ptr options) { options->addOption("--log.use-microtime", "use microtime instead", new BooleanParameter(&_useMicrotime)); - options->addOption("--log.ids", "log unique message ids", new BooleanParameter(&_showIds)); + options->addOption("--log.ids", "log unique message ids", + new BooleanParameter(&_showIds)) + .setIntroducedIn(30500); options->addOption("--log.role", "log server role", new BooleanParameter(&_showRole)); diff --git a/lib/Logger/LoggerFeature.h b/lib/Logger/LoggerFeature.h index b1731da4ea..45372dccca 100644 --- a/lib/Logger/LoggerFeature.h +++ b/lib/Logger/LoggerFeature.h @@ -62,7 +62,7 @@ class LoggerFeature final : public application_features::ApplicationFeature { bool _foregroundTty = false; bool _forceDirect = false; bool _useMicrotime = false; - bool _showIds = false; + bool _showIds = true; bool _showRole = false; bool _logRequestParameters = true; bool _supervisor = false;