HarperDB maintains a log of events that take place throughout operation. Log messages can be used for diagnostics purposes as well as database monitoring.
The log file location is defined in the HarperDB Configuration File.
The HarperDB log writes all messages as JSON objects, each containing the following attributes:
level: The severity of the message.
message: Title of the message.
timestamp: The timestamp of the message in ISO-8601 format.
Logs can be queried via the API using the
Example Log Message
Note, this example has been formatted for readability.
"message": "HarperDB successfully started",
Log File vs Standard Streams
HarperDB logs can optionally be streamed to standard streams. Logging to standard streams (stdout/stderr) is primarily used for container logging drivers. For more traditional installations, we recommend logging to a file. Logging to both standard streams and to a file can be enabled simultaneously.
To log to standard streams effectively, both
LOG_TO_STDSTREAMS must be set to
true. Note, logging to standard streams only will disable clustering catchup.