This is an example program how to use the ascii (narrow) chanraterset version of the SFLOG functions.
This is an example program how to use the ascii (narrow) chanraterset version of the SFLOG functions
10 std::string szAppName =
"testapp";
11 std::string szLogDir =
"C:\\temp";
12 DWORD dwBackupFiles=7;
13 size_t ulMaxFileSize= (1024 * 1024);
15 unsigned int uClientToken=0;
16 int nRetCode =
SFLOG_INITA(szAppName.c_str(),szLogDir.c_str(), dwBackupFiles, ulMaxFileSize,&uClientToken);
18 std::cout <<
" SUCCESS - Logging system is initialized .." << std::endl;
20 std::string szErrorMsg(
"Test message");
23 SFLOG_MSG_ERROR_A((szErrorMsg.c_str()));
28 std::cout <<
" Shutting down the Logging system ..." << std::endl;
header file for the public API of SFLOG library
int __stdcall SFLOG_LOGMSGA(int nLevel, LPCSTR szFilename, LPCSTR szFuncName, LPCSTR szFuncSig, int nLineNo, LPCSTR szMsg)
Log a narrow-character (i.e., ASCII) message.
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...
#define SFLOG_ERROR
Enable error level logging: error and fatal error messages.
Definition SFLOG.h:20
#define NDK_SUCCESS
SUCCESS return code.
Definition SFLOG.h:27
int __stdcall SFLOG_SHUTDOWN(unsigned int uClientToken)
Shutdown and release resources allocated by logging system.