feat(config): add rsyslog_level field to NetworkConfig for syslog severity filtering#870
Open
PhilipLykov wants to merge 1 commit intomeshtastic:masterfrom
Open
feat(config): add rsyslog_level field to NetworkConfig for syslog severity filtering#870PhilipLykov wants to merge 1 commit intomeshtastic:masterfrom
PhilipLykov wants to merge 1 commit intomeshtastic:masterfrom
Conversation
…erity 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
PhilipLykov
added a commit
to PhilipLykov/Meshtastic_firmware
that referenced
this pull request
Feb 27, 2026
Add rsyslog_level field to NetworkConfig protobuf and wire it to the existing Syslog::logMask() filtering mechanism. Users can now control which log messages are forwarded to the rsyslog server by severity. Changes: - Add LogLevel enum and rsyslog_level field (tag 12) to NetworkConfig in config.proto and generated nanopb files - Add syslogLevelToMask() helper in DebugConfiguration.h to map config values to syslog LOG_UPTO() bitmasks - Apply the configured log mask during syslog initialization in both ethClient.cpp (Ethernet) and WiFiAPClient.cpp (WiFi) Default behavior: UNSET (0) is treated as INFO, filtering out DEBUG messages. This reduces syslog noise for production deployments. Companion protobuf PR: meshtastic/protobufs#870 Made-with: Cursor
5 tasks
PhilipLykov
added a commit
to PhilipLykov/Meshtastic_firmware
that referenced
this pull request
Feb 27, 2026
Add rsyslog_level field to NetworkConfig protobuf and wire it to the existing Syslog::logMask() filtering mechanism. Users can now control which log messages are forwarded to the rsyslog server by severity. Changes: - Add LogLevel enum and rsyslog_level field (tag 12) to NetworkConfig in config.proto and generated nanopb files - Add syslogLevelToMask() helper in DebugConfiguration.h to map config values to syslog LOG_UPTO() bitmasks - Apply the configured log mask during syslog initialization in both ethClient.cpp (Ethernet) and WiFiAPClient.cpp (WiFi) Default behavior: UNSET (0) is treated as INFO, filtering out DEBUG messages. This reduces syslog noise for production deployments. Companion protobuf PR: meshtastic/protobufs#870 Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LogLevelenum toNetworkConfigwith values matchingLogRecord.Level(UNSET=0, TRACE=5, DEBUG=10, INFO=20, WARNING=30, ERROR=40, CRITICAL=50)rsyslog_levelfield (tag 12) toNetworkConfigto allow users to configure the minimum syslog severity levelMotivation
Currently the Meshtastic firmware forwards all log messages to the configured rsyslog server with no way to filter by severity. This generates significant syslog traffic, especially from DEBUG messages that are rarely needed in production.
This protobuf change adds the configuration field needed to support severity-based filtering. The companion firmware PR (meshtastic/firmware) implements the filtering logic using the existing
Syslog::logMask()mechanism.Backwards Compatibility
Test plan