#include "SystemLog.h" NAMESPACE_UPP SystemLog::SystemLog() {} SystemLog::SystemLog(String name) { String dllPath; #ifdef PLATFORM_WIN32 dllPath=GetExeDirFile("upplog.dll"); if(FileExists(dllPath)) Init(name,0,dllPath); else #endif Init(name); } bool SystemLog::Init(String name, int facility, String dllPath) { SetLevel(); #ifdef PLATFORM_POSIX openlog(name,LOG_CONS | LOG_PERROR,LOG_USER); #elif defined(PLATFORM_WIN32) String path; dword eventTypes = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE | EVENTLOG_INFORMATION_TYPE; dword categoryCount=0; log=NULL; path << "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\"<