This is an example program how to use the multi-byte (wide) chanraterset version of the SFLOG functions.
This is an example program how to use the multi-byte (wide) chanraterset version of the SFLOG functions
10 std::wstring szAppName = L
"testapp";
11 std::wstring szLogDir =L
"C:\\temp";
12 DWORD dwBackupFiles=7;
13 size_t ulMaxFileSize= (1024 * 1024);
15 unsigned int uClientToken=0;
16 int nRetCode =
SFLOG_INITW(szAppName.c_str(),szLogDir.c_str(), dwBackupFiles, ulMaxFileSize,&uClientToken);
18 std::wcout << L
" SUCCESS - Logging system is initialized .." << std::endl;
20 std::wstring szErrorMsg(L
"Test message");
28 std::wcout << L
" Shutting down the Logging system ..." << std::endl;
header file for the public API of SFLOG library
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...
#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.
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.
#define SFLOG_MSG_ERROR_W(msg)
Output a wide (multi-byte) character message at error-level.
Definition SFLOG.h:106