QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Warning message logging macros
[Logging]


Defines

#define WPF   Utils::LineLogLevel(Utils::warningClass,-2,__FILE__,__LINE__).print
#define WPF0(cat, format)
#define WPF1(cat, format, arg)
#define WPF2(cat, format, arg1, arg2)
#define WPF3(cat, format, arg1, arg2, arg3)
#define WPF4(cat, format, arg1, arg2, arg3, arg4)
#define WPF5(cat, format, arg1, arg2, arg3, arg4, arg5)

Detailed Description

Log a warning message with the given category. These messages are produced in debug and release builds and should be used when an action may have side-effects, be incomplete, or cause minor (recoverable) problems.

Parameters:
cat Category. This can be either an unsigned int obtained using Log::getCategory() or a string.
format printf() style format string. Ensure the correct number of '%' operators for the given number of arguments.

Define Documentation

#define WPF   Utils::LineLogLevel(Utils::warningClass,-2,__FILE__,__LINE__).print
 

WPF logs an error message using a variable number of arguments to the format string. This macro is more flexible than WPF0, WPF1, ..., which expect you to supply the stated number of parameters and you are advised to use it instead of them.

Example 1: WPF("tutorial", "Can't find object '%%s', using default", (const char*)obj.name());

Example 2: WPF(logger, "Can't find object '%%s', using default", (const char*)obj.name());

#define WPF0 cat,
format   ) 
 

Value:

Utils::Log::theLog()->print(Utils::warningClass, cat,  \
                    -2, __FILE__, __LINE__,                \
                    format)
format expects 0 args.
See also:
WPF

#define WPF1 cat,
format,
arg   ) 
 

Value:

Utils::Log::theLog()->print(Utils::warningClass, cat,  \
                    -2, __FILE__, __LINE__,                \
                    format, arg)
format expects 1 arg.
See also:
WPF

#define WPF2 cat,
format,
arg1,
arg2   ) 
 

Value:

Utils::Log::theLog()->print(Utils::warningClass, cat,  \
                    -2, __FILE__, __LINE__,                \
                    format, arg1, arg2)
format expects 2 args.
See also:
WPF

#define WPF3 cat,
format,
arg1,
arg2,
arg3   ) 
 

Value:

Utils::Log::theLog()->print(Utils::warningClass, cat,  \
                    -2, __FILE__, __LINE__,                \
                    format, arg1, arg2, arg3)
format expects 3 args.
See also:
WPF

#define WPF4 cat,
format,
arg1,
arg2,
arg3,
arg4   ) 
 

Value:

Utils::Log::theLog()->print(Utils::warningClass, cat,  \
                    -2, __FILE__, __LINE__,                \
                    format, arg1, arg2, arg3, arg4)
format expects 4 args.
See also:
WPF

#define WPF5 cat,
format,
arg1,
arg2,
arg3,
arg4,
arg5   ) 
 

Value:

Utils::Log::theLog()->print(Utils::warningClass, cat,  \
                    -2, __FILE__, __LINE__,                \
                    format, arg1, arg2, arg3, arg4, arg5)
format expects 5 args.
See also:
WPF

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004