NumXL SDK - Logging API
log_init.cpp

This is an example program how to initialize the SFLOG system in your application. More details about this example.

#include <windows.h>
#include <iostream>
#include <string>
#include "SFLOG.h"
int main(){
std::wstring szAppName = L"testapp";
std::wstring szLogDir =L"C:\\temp";
DWORD dwBackupFiles=7;
size_t ulMaxFileSize= (1024 * 1024); // 1 MB
unsigned int uClientToken=0;
int nRetCode = SFLOG_INITW(szAppName.c_str(),szLogDir.c_str(), dwBackupFiles, ulMaxFileSize,&uClientToken);
if(nRetCode == NDK_SUCCESS){
std::wcout << L" SUCCESS - Logging system is initialized" << std::endl;
SFLOG_SHUTDOWN(uClientToken);
}
return 0;
}
#define NDK_SUCCESS
SUCCESS return code.
Definition SFLOG.h:36
int __stdcall SFLOG_INITW(LPCWSTR szAppName, LPCWSTR szLogDir, DWORD dwBackupFiles, size_t ulMaxFileSize, unsigned int *pClientToken)
Initialize the logging system and accepts a unicode filename and path.
Definition SFLog.cpp:114
int __stdcall SFLOG_SHUTDOWN(unsigned int uClientToken)
write all the cache logs to the file and closed the log file.
Definition SFLog.cpp:286