> For the complete documentation index, see [llms.txt](https://zxdocs.gitbook.io/zhrxxlib/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zxdocs.gitbook.io/zhrxxlib/modules/utils/logger.md).

# logger

Logger Documetation

* `LogLevel`

Defines the log levels: `Debug`, `Info`, `Warning`, and `Error`.

* `log(level: LogLevel, msg: &str, log_to_file: bool)`

Logs a message with the specified log level, printing it to the console and optionally writing it to a file.

* `debug(msg: &str, log_to_file: bool)`

Logs a message with `Debug` level.

* &#x20;`info(msg: &str, log_to_file: bool)`

Logs a message with `Info` level.

* `warning(msg: &str, log_to_file: bool)`

Logs a message with `Warning` level.

* `error(msg: &str, log_to_file: bool)`

Logs a message with `Error` level.
