## Inject logging structure

The logs for this project are stored on the path specified in `INJECT_LOGS`,
which is set to `backend-logs.jsonl` by default.

### Format

The log file contains messages in the JSONL [format](https://jsonlines.org/).
Each message contains these fields:

- `module` - module where this message originates from
- `level` - log level, can be either `INFO`, `WARNING` or `ERROR`
- `date` - timestamp when the message was created
- `lineno` - line number
- `message` - the message text

### Troubleshooting

The logs contain quite a few messages and most of them won't be useful to admins for
figuring out why the platform does not behave as expected.
This is because the exercise is quite a complex state machine,
therefore we log all actions that happen during the exercise to help developers replicate bugs.

However, despite this _all_ `WARNING` and `ERROR` level logs should be considered when checking logs.
These logs might hint at the possible reasons why something does not work.

### Troubleshooting tips

- When debugging the process of sending emails with credentials,
    you can search for the word `credentials` in the `message` field.
    This should return _all_ logs related to sending these emails.
