From 5ad3ebd860873cea85faf3993617d565758870aa Mon Sep 17 00:00:00 2001 From: Philip Lykov Date: Fri, 27 Feb 2026 16:16:23 +0200 Subject: [PATCH] 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 --- meshtastic/config.proto | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index f1cdc4f3..bc7dfbd8 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -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 */