SDK 1.69.1
Brief about SDK
|
Initialization/Shutdown APIs | |
int __stdcall | SFLOG_INITW (LPCWSTR szAppName, LPCWSTR szLogDir, DWORD dwBackupFiles, size_t ulMaxFileSize, unsigned int *uClientToken) |
int __stdcall | SFLOG_INITA (LPCSTR szAppName, LPCSTR szLogDir, DWORD dwBackupFiles, size_t ulMaxFileSize, unsigned int *uClientToken) |
int __stdcall | SFLOG_SHUTDOWN (unsigned int uClientToken) |
#define | SFLOG_INIT SFLOG_INITW |
Logging Functions | |
int __stdcall | SFLOG_LOGMSGW (int nLevel, LPCSTR szFilename, LPCSTR szFuncName, LPCSTR szFuncSig, int nLineNo, LPCWSTR szMsg) |
int __stdcall | SFLOG_LOGMSGA (int nLevel, LPCSTR szFilename, LPCSTR szFuncName, LPCSTR szFuncSig, int nLineNo, LPCSTR szMsg) |
int __stdcall | SFLOG_GETLEVEL (unsigned int *nLevel) |
int __stdcall | SFLOG_SETLEVEL (unsigned int uClientToken, unsigned int nLevel) |
#define | SFLOG_LOGMSG SFLOG_LOGMSGA |
int __stdcall SFLOG_GETLEVEL | ( | unsigned int * | nLevel | ) |
An alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant.
NDK_SUCCESS | If the function succeeds |
NDK_FAILED | If the function fails, the return value is negative |
[out] | nLevel | current logging level |
int __stdcall SFLOG_INITA | ( | LPCSTR | szAppName, |
LPCSTR | szLogDir, | ||
DWORD | dwBackupFiles, | ||
size_t | ulMaxFileSize, | ||
unsigned int * | uClientToken ) |
Initialize the logging system for SDK. This is often the first API call that an application makes and is a prerequisite for other logging APIs.
NDK_SUCCESS | If the function succeeds |
NDK_FAILED | If the function fails, the return value is negative |
NDK_SKIP_INIT | If the function has been called earlier, and the logging system is already initialized |
NDK_DATAPATH_INVALID | If the szLogDir is invalid path or does not exist. |
Target Platform | Windows |
Header | SFLOG.h (include Windows.h) |
Library | SFLOG.lib |
DLL | SFLOG.dll |
[in] | szAppName | Required. Is the application name (user-defined), but must match the configuration base filename |
[in] | szLogDir | Optional. Is the full (absolute) path of the log file directory. If missing (i.e. NULL), SFLOG_Init uses the default temp directory in the current user's profile |
[in] | dwBackupFiles | Required. Is the number of backup log files to keep, before we overwite the oldest one |
[in] | ulMaxFileSize | Required. Is the maximym file size, before a rolling a new file starts (in bytes) |
[out] | uClientToken | an integer token used during the logging shutdown |
int __stdcall SFLOG_INITW | ( | LPCWSTR | szAppName, |
LPCWSTR | szLogDir, | ||
DWORD | dwBackupFiles, | ||
size_t | ulMaxFileSize, | ||
unsigned int * | uClientToken ) |
Initialize the logging system for SDK. This is often the first API call that an application makes and is a prerequisite for other logging APIs.
NDK_SUCCESS | If the function succeeds |
NDK_FAILED | If the function fails, the return value is negative |
NDK_SKIP_INIT | If the function has been called earlier, and the logging system is already initialized |
Target Platform | Windows |
Header | SFLOG.h (include Windows.h) |
Library | SFLOG.lib |
DLL | SFLOG.dll |
[in] | szAppName | Required. Is the application name (user-defined), but must match the configuration base filename |
[in] | szLogDir | Optional. is the full (absolute) path of the log file directory. If missing (i.e. NULL), SFLOG_Init uses the default temp directory in the current user's profile |
[in] | dwBackupFiles | Required. is the number of backup log files to keep, before we overwrite the oldest one |
[in] | ulMaxFileSize | Required. is the maximym file size, before a rolling a new file starts (in bytes) |
[out] | uClientToken | an integer token used during the logging shutdown |
int __stdcall SFLOG_LOGMSGA | ( | int | nLevel, |
LPCSTR | szFilename, | ||
LPCSTR | szFuncName, | ||
LPCSTR | szFuncSig, | ||
int | nLineNo, | ||
LPCSTR | szMsg ) |
Log a narrow-character (i.e., ASCII) message.
NDK_SUCCESS | If the function succeeds |
NDK_FAILED | If the function fails, the return value is negative |
__FILE__
: This macro expands to the name of the current input file__LINE__
: This macro expands to the current input line number, in the form of a decimal integer constant__FUNCTION__
: This macro expands to the the undecorated name of the enclosing function as a string literal__FUNCSIG__
: This macro expands to the the signature of the enclosing function as a string literal.Target Platform | Windows |
Header | SFLOG.h (include Windows.h) |
Library | SFLOG.lib |
DLL | SFLOG.dll |
[in] | nLevel | logging level (i.e. debug, info, trace, error, etc.) |
[in] | szFilename | the source filename that triggers this logging message |
[in] | szFuncName | the function name from which this log is triggered from |
[in] | szFuncSig | the function sugnature (i.e. mangled name) |
[in] | nLineNo | Line number in the source file |
[in] | szMsg | message |
int __stdcall SFLOG_LOGMSGW | ( | int | nLevel, |
LPCSTR | szFilename, | ||
LPCSTR | szFuncName, | ||
LPCSTR | szFuncSig, | ||
int | nLineNo, | ||
LPCWSTR | szMsg ) |
Log a wide-character (i.e., wchar_t*) message.
NDK_SUCCESS | If the function succeeds |
NDK_FAILED | If the function fails, the return value is negative |
NDK_UNINITIALIZED | if the logging system has not been initialized successfully yet. |
__FILE__
: This macro expands to the name of the current input file__LINE__
: This macro expands to the current input line number, in the form of a decimal integer constant__FUNCTION__
: This macro expands to the the undecorated name of the enclosing function as a string literal__FUNCSIG__
: This macro expands to the the signature of the enclosing function as a string literal.Target Platform | Windows |
Header | SFLOG.h (include Windows.h) |
Library | SFLOG.lib |
DLL | SFLOG.dll |
[in] | nLevel | logging level (i.e. debug, info, trace, error, etc.) |
[in] | szFilename | the source filename that triggers this logging message |
[in] | szFuncName | the function name from which this log is triggered from |
[in] | szFuncSig | the function sugnature (i.e. mangled name) |
[in] | nLineNo | Line number in the source file |
[in] | szMsg | message |
int __stdcall SFLOG_SETLEVEL | ( | unsigned int | uClientToken, |
unsigned int | nLevel ) |
set the new logging level in the SDK
NDK_SUCCESS | If the function succeeds |
NDK_FAILED | If the function fails, the return value is negative |
[in] | uClientToken | an integer token returned during the logging initialization |
[in] | nLevel | new logging level |
int __stdcall SFLOG_SHUTDOWN | ( | unsigned int | uClientToken | ) |
Shutdown and release resources allocated by logging system.
NDK_SUCCESS | If the function succeeds |
NDK_FAILED | If the function fails, the return value is negative |
NDK_UNINITIALIZED | If the logging system has not been successfuly initialized earlier. |
NDK_INVALID_TOKEN | If the value of the input argument - uClientToken - is invalid. |
Target Platform | Windows |
Header | SFLOG.h (include Windows.h) |
Library | SFLOG.lib |
DLL | SFLOG.dll |
[in] logging system token id (acquired during initialization)