# Introduce std.log · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/0bd067d19a434a5c7fd04d816d131cd593bdc1bf)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 0bd067d19a434a5c7fd04d816d131cd593bdc1bf

Requested commit: 0bd067d19a434a5c7fd04d816d131cd593bdc1bf

Commit: 0bd067d19a434a5c7fd04d816d131cd593bdc1bf

Tree: fc294c0d65cf0e63efe70ca4a87bdcaca3832637

Author: Isaac Freund

Committer: Isaac Freund

## Message

```
Introduce std.log

std.log provides 8 log levels and corresponding logging functions. It
allows the user to override the logging "backend" by defining root.log
and to override the default log level by defining root.log_level.

Logging functions accept a scope parameter which allows the implementer
of the logging "backend" to filter logging by library as well as level.

Using the standardized syslog [1] log levels ensures that std.log will
be flexible enough to work for as many use-cases as possible. If we were
to stick with only 3/4 log levels, std.log would be insufficient for
large and/or complex projects such as a kernel or display server.

[1]: https://tools.ietf.org/html/rfc5424#section-6.2.1

```

## Parents

- [9781342042798f7a75f3f7233872bae0fbde3ecc](https://git.cafe/gitcafe/zig/commit/9781342042798f7a75f3f7233872bae0fbde3ecc?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/0bd067d19a434a5c7fd04d816d131cd593bdc1bf?format=markdown)
