Logs
Aidbox produces structured logs on every significant event to the internal stream which you may direct to different ways:
Logs exporting with OTEL spec
Aidbox supports the OpenTelemetry protocol and exports logs in Protobuf format to any consumer that supports this specification.
OpenTelemetry logsLogs API
You can get current logs through REST API by GET /_logs
- response will be Chunked Transfer Encoding stream of new line separated JSON objects:
Logs in browser
You can open [aidbox-base]/_logs
in your browser, and Aidbox will produce logs in pretty format, similar to AIDBOX_STDOUT_PRETTY format for stdout. Appeared in v2210. Available formats: ui (default), json, event-stream. Use the following parameter to change the format [aidbox-base]/_logs?format=json
Configure logging
Stdout log
Both environment variables enable logging to stdout but the difference is log format.
Example of the log output when AIDBOX_STDOUT_JSON
enabled
AIDBOX_STDOUT_JSON
enabledExample of the log output when AIDBOX_STDOUT_PRETTY
enabled
AIDBOX_STDOUT_PRETTY
enabledLog to file
If 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:
Last updated
Was this helpful?