Skip to content

util: Avoid logging to multiple backends for stdout/stderr

Commit 83fe7a03 converted the stdout/stderr logging types to DEBUG_FILE to get a header when using DEBUG_SYSLOG_FORMAT_ALWAYS. However, this causes all configured backends to be invoked. When syslog is one of those backends then this is almost certainly not what is intended.

Instead, call debug_file_log() directly in that special case and revert the parts of the above commit that convert to file logging.

Most of the changes to debughdrclass() still seem necessary, since they handle the change of debug_syslog_format from a bool to an enum.


  • Commits have Signed-off-by: with name/author being identical to the commit author
  • (optional) This MR is just one part towards a larger feature.
  • (optional, if backport required) Bugzilla bug filed and BUG: tag added
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated
  • CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)

Reviewer's checklist:

  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code
Edited by Martin Schwenke

Merge request reports