Skip to content

Commit eff9c3f

Browse files
committed
refactor: adjust debug and info log levels for journald
Log DEBUG app messages with priority 6 (info) and INFO with priority 5 (notice). This is a workaround until the log subsystem on the Remote is updated to support debug levels.
1 parent a851040 commit eff9c3f

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## Unreleased
99
_Changes in the next release_
1010

11+
### Changed
12+
- Adapt journald log levels until the Remote supports native debug levels.
13+
1114
---
1215

1316
## v0.8.1 - 2025-12-24

‎src/driver.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,11 @@ def format(self, record):
367367
"""Format the log record with journald priority prefix."""
368368
# mapping of logging levels to journald priority levels
369369
# https://www.freedesktop.org/software/systemd/man/latest/sd-daemon.html#syslog-compatible-log-levels
370+
# Note: DEBUG app messages are logged with priority 6 (info) and INFO with priority 5 (notice)
371+
# This is a workaround until the log subsystem on the Remote is updated to support debug levels.
370372
priority = {
371-
logging.DEBUG: "<7>",
372-
logging.INFO: "<6>",
373+
logging.DEBUG: "<6>", # SD_INFO
374+
logging.INFO: "<5>", # SD_NOTICE
373375
logging.WARNING: "<4>",
374376
logging.ERROR: "<3>",
375377
logging.CRITICAL: "<2>",

0 commit comments

Comments
 (0)