libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
#include <EventLog.hpp>
Public Types | |
enum | error_types { err_error =EVENTLOG_ERROR_TYPE , err_warning =EVENTLOG_WARNING_TYPE , err_information =EVENTLOG_INFORMATION_TYPE , err_audit_success =EVENTLOG_AUDIT_SUCCESS , err_audit_fail =EVENTLOG_AUDIT_FAILURE } |
enum | categories { cat_none =CAT_NONE , cat_success =CAT_SUCCESS , cat_warning =CAT_WARNING , cat_error =CAT_ERROR , cat_critical =CAT_CRITICAL , cat_information =CAT_INFO , cat_custom1 =CAT_CUSTOM1 , cat_custom2 =CAT_CUSTOM2 , cat_custom3 =CAT_CUSTOM3 , cat_custom4 =CAT_CUSTOM4 , cat_custom5 =CAT_CUSTOM5 } |
typedef win_exception | exception_type |
Public Member Functions | |
__stdcall | EventLog () |
__stdcall | EventLog (const tstring &event_src_name, const unsigned int types=err_error|err_warning|err_information, const tstring &server=_T(""), const tstring &appln_log=_T("Application")) |
__stdcall | ~EventLog () |
void __fastcall | Create (const tstring &event_src_name, const unsigned int types=err_error|err_warning|err_information, const tstring &server=_T(""), const tstring &appln_log=_T("Application")) |
void __fastcall | Delete () |
void __fastcall | Log (const error_types wType, const categories Category, const tstring &str, const unsigned long dwDataSize=0, void *const lpRawData=NULL, SID *const lpUserSid=NULL) |
void __fastcall | Log (const error_types wType, const categories Category, const tstringstream &strm, const unsigned long dwDataSize=0, void *const lpRawData=NULL, SID *const lpUserSid=NULL) |
template<typename T > | |
void __fastcall | Log (const error_types wType, const categories wCategory, const typename T::const_iterator &begin, const typename T::const_iterator &end, const unsigned long dwDataSize, void *const lpRawData, SID *const lpUserSid) |
Additional Inherited Members | |
![]() | |
non_copyable ()=default | |
~non_copyable ()=default | |
non_copyable (non_copyable const &)=delete | |
non_copyable (non_copyable &&)=delete | |
void | operator= (non_copyable const &)=delete |
void | operator= (non_copyable &&)=delete |
Definition at line 28 of file EventLog.hpp.
Definition at line 30 of file EventLog.hpp.
Enumerator | |
---|---|
cat_none | |
cat_success | |
cat_warning | |
cat_error | |
cat_critical | |
cat_information | |
cat_custom1 | |
cat_custom2 | |
cat_custom3 | |
cat_custom4 | |
cat_custom5 |
Definition at line 41 of file EventLog.hpp.
Enumerator | |
---|---|
err_error | |
err_warning | |
err_information | |
err_audit_success | |
err_audit_fail |
Definition at line 34 of file EventLog.hpp.
|
inline |
Definition at line 114 of file EventLog.hpp.
__stdcall jmmcg::LIBJMMCG_VER_NAMESPACE::NTUtils::EventLog::EventLog | ( | const tstring & | event_src_name, |
const unsigned int | types = err_error|err_warning|err_information , |
||
const tstring & | server = _T("") , |
||
const tstring & | appln_log = _T("Application") |
||
) |
Note that if the "EventLog" object accesses a remote server, it must run under an account that has the correct permissions to access the Event Log on the server, otherwise you'll get access violations & permission violations. The "system" account does not have network access so the local server should be used, i.e. pass "NULL", the default.
|
inline |
Definition at line 119 of file EventLog.hpp.
|
inline |
Definition at line 61 of file EventLog.cpp.
|
inline |
Definition at line 124 of file EventLog.hpp.
void __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::NTUtils::EventLog::Log | ( | const error_types | wType, |
const categories | Category, | ||
const tstring & | str, | ||
const unsigned long | dwDataSize = 0 , |
||
void *const | lpRawData = NULL , |
||
SID *const | lpUserSid = NULL |
||
) |
Details of these types can be found by earching for help on the Win32 API function "::ReportEvent(...)".
|
inline |
Definition at line 68 of file EventLog.hpp.
|
inline |
Definition at line 72 of file EventLog.hpp.