HomeClusterLabs Projects

Refactor: various: Use crm_trace_nonlog more consistently

Description

Refactor: various: Use crm_trace_nonlog more consistently

We should use crm_is_callsite_active() consistently with the tags
argument set to crm_trace_nonlog to check whether a non-logging callsite
is active, if the callsite was initialized with crm_trace_nonlog (as the
tags argument to qb_log_callsite_get()).

Currently, there are some places where we call crm_is_callsite_active
with tags set to 0 and others where we check cs->targets directly
instead of calling the function. Calling the function (with the correct
tags argument) is more consistent and ensures that we refilter (and thus
update cs->targets) if the priority changes.

This also gives us a few more opportunities to use pcmk__if_tracing() in
places where the log priority was LOG_TRACE and the tag was
crm_trace_nonlog.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Jan 31 2023, 3:22 AM
Parents
rP72ccbd782ac8: Refactor: various: Use pcmk__output_t in pcmk__xml_log_changes()
Branches
Unknown
Tags
Unknown