HomeClusterLabs Projects

Refactor: libcrmcommon: Log messages coming from certain domains.

Description

Refactor: libcrmcommon: Log messages coming from certain domains.

Instead of overriding the global default handler with our own, we can
tell glib to use it only for G_LOG_DOMAIN. Additionally, log messages
coming from the glib domains so that any assertions caused by
pacemaker's usage of glib will use our handler as well. All other
domains will continue to use the glib default.

This means that linking with libpacemaker will not override third party
program logging. It also allows those programs to override our "GLib"
domain logging with their own.

Additionally, we should mark all log messages coming from the Pacemaker
domain as being non-fatal. Other domains can do whatever they want and
we won't override it.

Fixes T837

Details

Provenance
clumensAuthored on Aug 16 2024, 3:55 PM
Parents
rP505d9a4c0493: Feature: include: Add G_LOG_DOMAIN to crm_internal.h.
Branches
Unknown
Tags
Unknown
Tasks
T837: Use glib logging domain