feat(config): add rsyslog_level field to NetworkConfig for syslog severity filtering

Add a LogLevel enum and rsyslog_level field to NetworkConfig to allow
users to control which log messages are forwarded to the rsyslog server.
Only messages at or above the configured severity level are sent.

The LogLevel values (UNSET=0, TRACE=5, DEBUG=10, INFO=20, WARNING=30,
ERROR=40, CRITICAL=50) match LogRecord.Level for consistency.

Default behavior (UNSET) sends INFO and above, filtering out DEBUG
messages to reduce syslog noise.

Made-with: Cursor
This commit is contained in:
Philip Lykov 2026-02-27 16:16:23 +02:00
parent f7f7c8d2e4
commit 5ad3ebd860

View file

@ -578,6 +578,54 @@ message Config {
*/
bool ipv6_enabled = 11;
/*
* Syslog log level to control which messages are sent to the rsyslog server.
* Only messages at or above this level will be forwarded.
* Values match LogRecord.Level for consistency. Default (UNSET) treats as INFO.
*/
enum LogLevel {
/*
* No level set, firmware defaults to INFO
*/
LOG_UNSET = 0;
/*
* Trace level (most verbose)
*/
LOG_TRACE = 5;
/*
* Debug level
*/
LOG_DEBUG = 10;
/*
* Informational
*/
LOG_INFO = 20;
/*
* Warning conditions
*/
LOG_WARNING = 30;
/*
* Error conditions
*/
LOG_ERROR = 40;
/*
* Critical conditions
*/
LOG_CRITICAL = 50;
}
/*
* Minimum severity level of log messages to send to the rsyslog server.
* Messages below this level are filtered out. Default (UNSET) sends INFO and above.
*/
LogLevel rsyslog_level = 12;
/*
* Available flags auxiliary network protocols
*/