Logging Macros

The following macros can be used to log messages at levels 6, 8, 10, 12, and 16:

COM_LOG6
COM_LOG8
COM_LOG10
COM_LOG12
COM_LOG16

Syntax

COM_LOGa ( b ) "" ))
for a message with no parameters.

COM_LOGa ( b ) " %c " , e ))
for a message with one parameter.

COM_LOGa ( b ) " %c | %d | . . ." , e , f , . . .))
for a message with more than one parameter.

Parameters

a
Severity: 6, 8, 10, 12, or 16.
b
Message number.
c, d, . . .
Format of the first, second, and so on up to nine variable parameters.
e, f, . . .
First, second, and so on up to nine variable parameters.

Remarks

Up to nine parameters can be supplied, according to the number of "%n" placeholders in the text of the message being logged. The first parameter replaces %1, the second replaces %2, and so on.

The formats c and d must be valid formats for the C function sprintf, because the logging macro uses this function to generate the complete text string to be logged.

Note that the unmatched parentheses on the macro call are deliberate; the expansion of the macro supplies the remaining parentheses so that the resulting code is correct.