#null-net #target #liblogging

bin+lib nullnet-liblogging

Logging library for NullNet

4 releases

0.2.0 Mar 3, 2025
0.1.2 Feb 19, 2025
0.1.1 Feb 18, 2025
0.1.0 Feb 17, 2025

#68 in #target

Download history 339/week @ 2025-02-16 32/week @ 2025-02-23 143/week @ 2025-03-02 10/week @ 2025-03-09

154 downloads per month
Used in 2 crates (via nullnet-wallguard-server)

MIT license

29KB
536 lines

liblogging

Logging library for Nullnet.

Use this library simply by calling the Logger::init method with the desired configuration, and then invoking the log macros.

It handles logs to console, syslog, and Datastore.
Each of these loggers can be enabled or disabled independently.

Log levels

You can configure the log level by setting the LOG_LEVEL environment variable. The possible log levels are:

  • OFF
  • ERROR
  • WARN
  • INFO
  • DEBUG
  • TRACE

If you don't set the LOG_LEVEL environment variable, TRACE will be used by default (the most verbose level).

Allowed targets

By default, only logs from targets in the form nullnet*, appguard*, and wallguard* will be emitted.

To allow additional targets, set them in the LoggerConfig passed to the Logger::init method (e.g., specifying "serde" will emit logs for all targets whose name is in the form serde*).

Dependencies

~22–51MB
~881K SLoC