Logging - SGE Documentation

## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

# Logging

SGE provides a log backend, that can be optionally drawn to the screen and printed to stdout.

`draw_logs()` can be used to draw all the logs to the screen as rich text, when wanted.

Messages can be logged out using the included standard `log` macros. Shown in descending order of importance:

- `error!` for logging out critical errors. Shown by default.
- `warn!` for logging out things that may be errors or indications of a bug, but do not stop the program from working. Shown by default.
- `info!` for logging out useful information. Shown by default.
- `debug!` for logging out debug info messages. Not shown by default.
- `trace!` for logging out very minor information that could be useful for tracking down a bug. Not shown by default.

The minimum log level can be set with `set_min_log_level`, to show only logs equal to or more important than some log level, or disabled entirely.

The logger has multiple verbosity levels that can be configured using `set_logger_verbosity`.

Logs will be printed to the terminal by default.

See: logging module