HomeClusterLabs Projects

Refactor: libcrmcommon: allow setting filters for logger output objects

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Refactor: libcrmcommon: allow setting filters for logger output objects

With the usual logging functions, filters (PCMK_trace_functions etc.) operate
based on the caller's file, function, and line number. However, with logger
output objects, there was previously no way to set those, so the logger method
implementation itself would always be used for filtering.

A new internal API pcmk__output_set_log_filter() allows setting the file,
function, line number, and tags that will be used to filter logger
output object messages.

libqb logging functions are called directly to accomplish this, which as a
side effect allows us to use variadic arguments directly rather than allocate a
separate buffer in some cases.

As of this commit, nothing uses the new API yet.

Details

Provenance
kgaillotAuthored on Jul 13 2023, 5:18 PM
Tasks
Restricted Maniphest Task

Commit No Longer Exists

This commit no longer exists in the repository.