Skip to content

Conversation

@nrwahl2
Copy link
Contributor

@nrwahl2 nrwahl2 commented Nov 26, 2025

No description provided.

The tags argument is always 0, so they're equivalent:

define qb_log(priority, fmt, args...) qb_logt(priority, 0, fmt, ##args)

Signed-off-by: Reid Wahl <[email protected]>
See the removed comment for more info on why these gratuitous spaces
were present in logging.h and cts-exec-helper.c.

We don't use the extra space in other files that use '##args'
(scheduler_internal.h, cib_utils.c, and output_log.c). And gcc fixed
that bug in version 3.0.0, which was released in 2001. We should be
okay.

Details:
https://gcc.gnu.org/onlinedocs/gcc-4.2.2/cpp/Differences-from-previous-versions.html#Differences-from-previous-versions
https://gcc.gnu.org/gcc-3.0/

Signed-off-by: Reid Wahl <[email protected]>
To replace crm_emerg().

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
To replace crm_crit().

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
To replace crm_err().

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
@nrwahl2 nrwahl2 requested a review from clumens November 26, 2025 23:03
To replace crm_warn()

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
To replace crm_notice()

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
To replace crm_info()

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
To replace crm_debug()

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
On the surface, it looks as if this changes public API. However, we
require libqb v1.0.1 or later. qb/qblog.h has defined the LOG_TRACE
constant since at least v0.5.0 (see commit 568befd).

So LOG_TRACE is always defined when we reach the dropped code.

Note that on GitHub, it looks as if commit 568befd was introduced in
v1.9.0. However, that's due to a tag naming mistake: the commit is
present in tag "1.9.0", which comes before "v1.9.0" in GitHub's sort
order. If you view all tags in which this commit is found, you'll see
that it's present in v0.5.0.

Signed-off-by: Reid Wahl <[email protected]>
To replace LOG_STDOUT.

We can't even deprecate LOG_STDOUT until the public macros that use it
are deprecated.

Signed-off-by: Reid Wahl <[email protected]>
To replace LOG_NEVER.

We can't even deprecate LOG_NEVER until the public macros that use it
are deprecated.

Signed-off-by: Reid Wahl <[email protected]>
@nrwahl2 nrwahl2 changed the title WIP: Deprecate public crm_LOG_LEVEL() macros Deprecate public crm_LOG_LEVEL() macros Nov 27, 2025
@nrwahl2 nrwahl2 marked this pull request as ready for review November 27, 2025 03:25
@nrwahl2
Copy link
Contributor Author

nrwahl2 commented Nov 27, 2025

retest this please

To replace crm_trace()

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
To replace crm_log_xml_err()

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
To replace crm_log_xml_warn()

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
To replace crm_log_xml_notice()

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
To replace crm_log_xml_info()

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
To replace crm_log_xml_debug()

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
To replace crm_log_xml_trace()

Signed-off-by: Reid Wahl <[email protected]>
Pacemaker should not be used for general-purpose logging.

Ref T622

Signed-off-by: Reid Wahl <[email protected]>
@nrwahl2
Copy link
Contributor Author

nrwahl2 commented Nov 27, 2025

I went ahead and added commits for the crm_log_xml_LEVEL stuff. It's nothing compared to the crm_LEVEL stuff, and it takes care of the rest of #3845.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant