Skip to content

Persistent daemon log level#613

Open
jrauh01 wants to merge 6 commits into
mainfrom
feature/persistent-daemon-log-level
Open

Persistent daemon log level#613
jrauh01 wants to merge 6 commits into
mainfrom
feature/persistent-daemon-log-level

Conversation

@jrauh01
Copy link
Copy Markdown
Contributor

@jrauh01 jrauh01 commented Feb 27, 2026

Problem

Till now the daemon log level could be set in Icinga Web, but it was not persisted anywhere.

Changes

The chosen value in the Icinga Web form will now be persisted to the database. The daemon queries the database on startup and applies it to the logger under following conditions:

  1. A log level is set in the database.
  2. No log level flag is passed to the daemon run command (like --verbose or --debug).

Additionally some minor code improvements have been done.

@jrauh01 jrauh01 self-assigned this Feb 27, 2026
@cla-bot cla-bot Bot added the cla/signed label Feb 27, 2026
@jrauh01 jrauh01 force-pushed the feature/persistent-daemon-log-level branch 2 times, most recently from 5f4ad3f to 344d8aa Compare February 27, 2026 13:55
@jrauh01 jrauh01 requested a review from lippserd March 6, 2026 06:04
@jrauh01 jrauh01 changed the title Feature/persistent daemon log level Persistent daemon log level Mar 25, 2026
@lippserd lippserd added this to the v1.9.0 milestone Mar 26, 2026
jrauh01 added 6 commits April 29, 2026 21:18
If the RPC call to set the daemon log level resolves, the log level is stored in
the database to preserve it when restarting the daemon.
When starting the daemon the log level is read from the database and applied to
the logger.

Terminal flags like `--verbose` and `--debug` have a higher precedence and the
database configuration will **not** be applied if one of them is passed to the
daemon run command.
It's not necessary or advantageous to split the content in two methods.
@lippserd lippserd force-pushed the feature/persistent-daemon-log-level branch from 344d8aa to 5abf677 Compare April 29, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants