Logs
Last updated
Aidbox produces structured logs on every significant event to the internal stream which you may direct to different ways:
Aidbox logs can be used in audit. Please, see our article on auditing for more info.
Aidbox supports the OpenTelemetry protocol and exports logs in Protobuf format to any consumer that supports this specification.
You can get current logs through REST API by GET /_logs
- response will be Chunked Transfer Encoding stream of new line separated JSON objects:
Please, pay attention, that you will not see the response for GET /_logs
request in the Aidbox REST console. Use the terminal, or the browser console instead.
You can open [aidbox-base]/_logs?format=pretty
in your browser, and Aidbox will produce logs in pretty format, similar to AIDBOX_STDOUT_PRETTY format for stdout. Appeared in v2210.
Aidbox sends logs into stdout if one of these env variables defined: AIDBOX_STDOUT_JSON
, AIDBOX_STDOUT_PRETTY
.
Both environment variables enable logging to stdout but the difference is log format.
AIDBOX_STDOUT_JSON
enabledAIDBOX_STDOUT_PRETTY
enabledIf you prefer to write logs into the file system, in the .env file specify AIDBOX_LOGS
environment variable with a relative path to the desired location.
Another option is to store logs in: