Conditionally writes an entry to the log.
Syntax
#include <prlog.h> void PR_LOG ( PRLogModuleInfo *_module, PRLogModuleLevel _level ... _args);
Parameters
The macro has these parameters:
- _module
- A pointer to a log module structure.
- _level
-
A level value. Possible values are:
PR_LOG_NONE = 0 PR_LOG_ALWAYS = 1 PR_LOG_ERROR = 2 PR_LOG_WARNING = 3 PR_LOG_DEBUG = 4 PR_LOG_NOTICE = PR_LOG_DEBUG PR_LOG_WARN = PR_LOG_WARNING PR_LOG_MIN = PR_LOG_DEBUG PR_LOG_MAX = PR_LOG_DEBUG
- _args
- A variable length argument list, as if to
printf
.
Returns
Nothing
Description
This macro formats the specified arguments and writes the output to the log file, if logging is enabled for the specified module and level. For a description of formatting and format strings, see "Formatted Printing".
For an example of using conditional logging, see Use Example.
This macro compiles to nothing if compile-time options are not specified to enable logging.