]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: trace: change the TRACE() calling convention to put the args and cb last
authorWilly Tarreau <w@1wt.eu>
Wed, 28 Aug 2019 08:35:16 +0000 (10:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 28 Aug 2019 08:39:43 +0000 (10:39 +0200)
commitc326ecc9b10385d4d6b889d7ecfb0fb0dc8d8fb8
treea06d71abf9197ea521a81fdffecc903d82896823
parenta9f5b96e029b71459e866427a0aad1e4ded8e50a
MINOR: trace: change the TRACE() calling convention to put the args and cb last

Previously the callback was almost mandatory so it made sense to have it
before the message. Now that it can default to the one declared in the
trace source, most TRACE() calls contain series of empty args and callbacks,
which make them suitable for being at the end and being totally omitted.

This patch thus reverses the TRACE arguments so that the message appears
first, then the mask, then arg1..arg4, then the callback. In practice
we'll mostly see 1 arg, or 2 args and nothing else, and it will not be
needed anymore to pass long series of commas in the middle of the
arguments. However if a source is enforced, the empty commas will still
be needed for all omitted arguments.
include/proto/trace.h