Determines if logging is enabled for a module and level.
Syntax
#include <prlog.h> PRBool PR_LOG_TEST ( PRLogModuleInfo *_module, PRLogModuleLevel _level);
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
Returns
PR_TRUE
when logging is enabled for the given module and level, otherwise PR_FALSE
.
Description
This macro tests whether logging is enabled for the specified module and level. Use it as an expression in a conditional execution statement to control logging. See also PR_LOG
.