#include <windows.h>
#include <iostream>
#include <string>
int main(){
std::wstring szAppName = L"testapp";
std::wstring szLogDir =L"C:\\temp";
DWORD dwBackupFiles=7;
size_t ulMaxFileSize= (1024 * 1024);
unsigned int uClientToken=0;
int nRetCode =
SFLOG_INITW(szAppName.c_str(),szLogDir.c_str(), dwBackupFiles, ulMaxFileSize,&uClientToken);
std::wcout << L" SUCCESS - Logging system is initialized" << std::endl;
}
return 0;
}
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 NDK_SUCCESS
SUCCESS return code.
Definition SFLOG.h:27
int __stdcall SFLOG_SHUTDOWN(unsigned int uClientToken)
Shutdown and release resources allocated by logging system.