Logging & Audit
Aidbox produces structured logs on every signifact 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.
Logs 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:
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.
Logs in browser
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.
Configure logging
Stdout log
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.
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 the ElasticSearch. Please, read the details here
Last updated