SDK 1.69.1
Brief about SDK
Loading...
Searching...
No Matches
log_init.cpp
#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;
}
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.