The SFMSG module provide the multi-locality support functionality to NumXL SDK. The locality subsystem is used internally by NumXL SDK APIs.
Upon calling the initialization API (i.e., SFMSG_Init(.)), the calling application passes the configuration parameters as arguments:
Upon initialization, the SFLOG set the logging level or threshold to SFLOG_ERROR (or 5), by default. Thus, only log messages with severity of error or higher will be written to the log file.
To inquire about the current log level, client application should call SFLOG_GETLEVEL(), and to change the log level from its current level, client application must call SFLOG_SETLEVEL() function.
Macro | Level | Description |
---|---|---|
SFLOG_ALL | 0 | Enable all logging messages (info, debug, trace, warning and error). |
SFLOG_TRACE | 1 | Enable trace level logging: trace, debug, info, warning, error and fatal error messages. |
SFLOG_DEBUG | 2 | Enable debug level logging: debug, info, warning, error and fatal error messages. |
SFLOG_INFO | 3 | Enable information level logging: info, warning, error, and fatal error messages. |
SFLOG_WARN | 4 | Enable warning level logging: warning, error and fatal error messages. |
SFLOG_ERROR | 5 | Enable error level logging: error and fatal error messages. |
SFLOG_FATAL | 6 | Enable fatal or critical level logging. |
SFLOG_OFF | 7 | Disable all logging messages. |
The client application writes to the log file by calling the SFLOG_LOGMSGA(.) for ASCII text, or SFLOG_LOGMSGW(.) for wide-charcter unicode messages. Using either variant of those two functions, the client application must provide the folllowing details:
Just like we have for SFLOG_INIT, the SFLOG includes a helper macro SFLOG_LOGMSG that expands during compile-time to proper variant of the function based on your project's charater-set size.
Furthermore, the SFLOG system includes a set of helper macros (e.g., SFLOG_MSG_INFO, SFLOG_MSG_ERROR) to simply the logging greatly, by passing the compiler preprocessors (e.g., FILE, LINE) to many of the arguments. There is two variants of he macros: single-character (ASCII) message and wide-character (Unicode) messages.
The SFLOG library is a standalone module from the rest of the NumXL SDK.
Target Platform | Windows |
Header | SFLOG.h (include Windows.h) |
Library | SFLOG.lib |
DLL | SFLOG.dll |