ArangoDB v3.13 is under development and not released yet. This documentation is not final and potentially incomplete.
Logs
Server events and errors are logged depending on the defined log levels for the available log topics
Whether events are logged to a file, syslog, or only an attached terminal depends on the log startup options.
See Log levels for a detailed
description of the FATAL
, ERROR
, and other levels of log messages.
The permissions required to use the /_admin/log*
endpoints depends on the
setting of the --log.api-enabled
startup option.
Get the global server logs
Returns fatal, error, warning or info log messages from the server’s global log. The result is a JSON object with the following properties:
- total: the total amount of log entries before pagination
- messages: an array with log messages that matched the criteria
This API can be turned off via the startup option --log.api-enabled
. In case
the API is disabled, all requests will be responded to with HTTP 403. If the
API is enabled, accessing it requires admin privileges, or even superuser
privileges, depending on the value of the --log.api-enabled
startup option.
Get the global server logs (deprecated)
/_admin/log/entries
instead, which provides the same data in a more
intuitive and easier to process format.Returns fatal, error, warning or info log messages from the server’s global log. The result is a JSON object with the attributes described below.
This API can be turned off via the startup option --log.api-enabled
. In case
the API is disabled, all requests will be responded to with HTTP 403. If the
API is enabled, accessing it requires admin privileges, or even superuser
privileges, depending on the value of the --log.api-enabled
startup option.
Get the server log levels
Returns the server’s current log level settings. The result is a JSON object with the log topics being the object keys, and the log levels being the object values.
This API can be turned off via the startup option --log.api-enabled
. In case
the API is disabled, all requests will be responded to with HTTP 403. If the
API is enabled, accessing it requires admin privileges, or even superuser
privileges, depending on the value of the --log.api-enabled
startup option.
withAppenders boolean
Set this option to
true
to return the individual log level settings of all log outputs (appenders
) as well as theglobal
settings.The response structure is as follows:
{ "global": { "agency": "INFO", "agencycomm": "INFO", "agencystore": "WARNING", ... }, "appenders": { "-": { "agency": "INFO", "agencycomm": "INFO", "agencystore": "WARNING", ... }, "file:///path/to/file": { "agency": "INFO", "agencycomm": "INFO", "agencystore": "WARNING", ... }, ... } }
Set the server log levels
Modifies and returns the server’s current log level settings. The request body must be a JSON string with a log level or a JSON object with the log topics being the object keys and the log levels being the object values.
If only a JSON string is specified as input, the log level is adjusted for the “general” log topic only. If a JSON object is specified as input, the log levels will be set only for the log topic mentioned in the input object, but preserved for every other log topic. To set the log level for all log levels to a specific value, it is possible to hand in the special pseudo log topic “all”.
The result is a JSON object with all available log topics being the object keys, and the adjusted log levels being the object values.
Possible log levels are:
FATAL
- Only critical errors are logged after which the arangod process terminates.ERROR
- Only errors are logged. You should investigate and fix errors as they may harm your production.WARNING
- Errors and warnings are logged. Warnings may be serious application-wise and can indicate issues that might lead to errors later on.INFO
- Errors, warnings, and general information is logged.DEBUG
- Outputs debug messages used in the development of ArangoDB in addition to the above.TRACE
- Logs detailed tracing of operations in addition to the above. This can flood the log. Don’t use this log level in production.
This API can be turned off via the startup option --log.api-enabled
. In case
the API is disabled, all requests will be responded to with HTTP 403. If the
API is enabled, accessing it requires admin privileges, or even superuser
privileges, depending on the value of the --log.api-enabled
startup option.
withAppenders boolean
Set this option to
true
to set individual log level settings for log outputs (appenders
). The request and response structure is as follows:{ "global": { "agency": "INFO", "agencycomm": "INFO", "agencystore": "WARNING", ... }, "appenders": { "-": { "agency": "INFO", "agencycomm": "INFO", "agencystore": "WARNING", ... }, "file:///path/to/file": { "agency": "INFO", "agencycomm": "INFO", "agencystore": "WARNING", ... }, ... } }
Changing the
global
settings affects all outputs and is the same as setting a log level with this option turned off.
Reset the server log levels
Introduced in: v3.12.1
Revert the server’s log level settings to the values they had at startup, as determined by the startup options specified on the command-line, a configuration file, and the factory defaults.
The result is a JSON object with the log topics being the object keys, and the log levels being the object values.
This API can be turned off via the startup option --log.api-enabled
. In case
the API is disabled, all requests will be responded to with HTTP 403. If the
API is enabled, accessing it requires admin privileges, or even superuser
privileges, depending on the value of the --log.api-enabled
startup option.
Get the structured log settings
Returns the server’s current structured log settings.
The result is a JSON object with the log parameters being the object keys, and
true
or false
being the object values, meaning the parameters are either
enabled or disabled.
This API can be turned off via the startup option --log.api-enabled
. In case
the API is disabled, all requests will be responded to with HTTP 403. If the
API is enabled, accessing it requires admin privileges, or even superuser
privileges, depending on the value of the --log.api-enabled
startup option.
Set the structured log settings
Modifies and returns the server’s current structured log settings.
The request body must be a JSON object with the structured log parameters
being the object keys and true
or false
object values, for either
enabling or disabling the parameters.
The result is a JSON object with all available structured log parameters being
the object keys, and true
or false
being the object values, meaning the
parameter in the object key is either enabled or disabled.
This API can be turned off via the startup option --log.api-enabled
. In case
the API is disabled, all requests will be responded to with HTTP 403. If the
API is enabled, accessing it requires admin privileges, or even superuser
privileges, depending on the value of the --log.api-enabled
startup option.