C# Class NSoft.NFramework.WindowsSystem.EventLogTool

RwEventLog를 이용하여, Windows Event Log를 쉽게 사용할 수 있는 Utility Class 입니다.
Show file Open project: debop/NFramework Class Usage Examples

Public Methods

Method Description
FindEntryByEntryType ( System.Diagnostics.EventLog eventLog, EventLogEntryType entryType ) : IEnumerable

지정된 EventLogEntryType(수준)과 같은 EventLogEntry를 검색한다.

FindEntryByEntryType ( string logName, string source, EventLogEntryType entryType ) : IEnumerable

지정된 EventLogEntryType(수준)과 같은 EventLogEntry를 검색한다.

FindEntryByGeneratedTime ( System.Diagnostics.EventLog eventLog, System.DateTime generatedTime, bool isBefore ) : IEnumerable

EventLogEntry의 생성 시간을 기준으로 검색한다.

FindEntryByGeneratedTime ( string logName, string source, System.DateTime generatedTime, bool isBefore ) : IEnumerable

EventLogEntry의 생성 시간을 기준으로 검색한다.

FindEntryBySource ( System.Diagnostics.EventLog eventLog, string source, bool ignoreCase ) : IEnumerable

EventLogEntry의 원본 이름으로 찾기

FindEntryBySource ( string logName, string source, bool ignoreCase ) : IEnumerable

EventLogEntry의 원본 이름으로 찾기

GetEventLog ( string logName ) : System.Diagnostics.EventLog

logName">로그 이름에 해당하는

GetEventLog ( string logName, string source ) : System.Diagnostics.EventLog

해당 EventLog를 반환한다. Event Source가 없다면 생성한다.

GetEventLog ( string logName, string source, string machineName ) : System.Diagnostics.EventLog

해당 EventLog를 반환한다. Event Source가 없다면 생성한다.

SetLogMaxSize ( string logName, int maxSize ) : void

이벤트 로그 크기를 조절한다.

레지스트리를 조작할 수 있는 권한이 있어야 한다.

WriteEntry ( string message, EventLogEntryType type ) : void

이벤트 로그를 쓴다.

WriteEntry ( string logName, string source, string message, EventLogEntryType type ) : void

이벤트 로그를 쓴다.

WriteEntry ( string logName, string source, string message, EventLogEntryType type, int eventID ) : void

이벤트 로그를 쓴다.

WriteEntry ( string logName, string source, string message, EventLogEntryType type, int eventID, short category ) : void

이벤트 로그를 쓴다.

WriteEntry ( string logName, string source, string message, EventLogEntryType type, int eventID, short category, byte rawData ) : void

이벤트 로그를 쓴다.

Method Details

FindEntryByEntryType() public static method

지정된 EventLogEntryType(수준)과 같은 EventLogEntry를 검색한다.
public static FindEntryByEntryType ( System.Diagnostics.EventLog eventLog, EventLogEntryType entryType ) : IEnumerable
eventLog System.Diagnostics.EventLog 대상 EventLog 인스턴스
entryType EventLogEntryType 검색할 EventLogEntryType(수준)의 값
return IEnumerable

FindEntryByEntryType() public static method

지정된 EventLogEntryType(수준)과 같은 EventLogEntry를 검색한다.
public static FindEntryByEntryType ( string logName, string source, EventLogEntryType entryType ) : IEnumerable
logName string EventLog의 이름
source string 검색할 EventLogEntry의 원본 이름
entryType EventLogEntryType 검색할 EventLogEntryType(수준)의 값
return IEnumerable

FindEntryByGeneratedTime() public static method

EventLogEntry의 생성 시간을 기준으로 검색한다.
public static FindEntryByGeneratedTime ( System.Diagnostics.EventLog eventLog, System.DateTime generatedTime, bool isBefore ) : IEnumerable
eventLog System.Diagnostics.EventLog 대성 EventLog 인스턴스
generatedTime System.DateTime 검색할 기준 시간
isBefore bool 기준시간 전/후를 판단하는 옵션
return IEnumerable

FindEntryByGeneratedTime() public static method

EventLogEntry의 생성 시간을 기준으로 검색한다.
public static FindEntryByGeneratedTime ( string logName, string source, System.DateTime generatedTime, bool isBefore ) : IEnumerable
logName string 로그 엔트리 목록 (예: Application, System)
source string 로그 소스
generatedTime System.DateTime 검색할 기준 시간
isBefore bool 기준시간 전/후를 판단하는 옵션
return IEnumerable

FindEntryBySource() public static method

EventLogEntry의 원본 이름으로 찾기
public static FindEntryBySource ( System.Diagnostics.EventLog eventLog, string source, bool ignoreCase ) : IEnumerable
eventLog System.Diagnostics.EventLog 검색 대상 EventLog
source string 검색할 EventLogEntry의 원본 이름
ignoreCase bool 대소문자 구분 여부
return IEnumerable

FindEntryBySource() public static method

EventLogEntry의 원본 이름으로 찾기
public static FindEntryBySource ( string logName, string source, bool ignoreCase ) : IEnumerable
logName string EventLog의 이름
source string 검색할 EventLogEntry의 원본 이름
ignoreCase bool 대소문자 구분 여부
return IEnumerable

GetEventLog() public static method

logName">로그 이름에 해당하는
public static GetEventLog ( string logName ) : System.Diagnostics.EventLog
logName string
return System.Diagnostics.EventLog

GetEventLog() public static method

해당 EventLog를 반환한다. Event Source가 없다면 생성한다.
public static GetEventLog ( string logName, string source ) : System.Diagnostics.EventLog
logName string 로그 이름
source string 이벤트 로그 엔트리 소스
return System.Diagnostics.EventLog

GetEventLog() public static method

해당 EventLog를 반환한다. Event Source가 없다면 생성한다.
public static GetEventLog ( string logName, string source, string machineName ) : System.Diagnostics.EventLog
logName string 로그 이름
source string 엔트리 소스
machineName string 로그가 있는 컴퓨터
return System.Diagnostics.EventLog

SetLogMaxSize() public static method

이벤트 로그 크기를 조절한다.
레지스트리를 조작할 수 있는 권한이 있어야 한다.
public static SetLogMaxSize ( string logName, int maxSize ) : void
logName string 이벤트 로그 이름
maxSize int Log 크기, KByte 단위
return void

WriteEntry() public static method

이벤트 로그를 쓴다.
public static WriteEntry ( string message, EventLogEntryType type ) : void
message string 이벤트 메시지
type EventLogEntryType 이벤트 수준(경고, 정보 등)
return void

WriteEntry() public static method

이벤트 로그를 쓴다.
public static WriteEntry ( string logName, string source, string message, EventLogEntryType type ) : void
logName string 이벤트 로그 명
source string 원본
message string 이벤트 메시지
type EventLogEntryType 이벤트 수준(경고, 정보 등)
return void

WriteEntry() public static method

이벤트 로그를 쓴다.
public static WriteEntry ( string logName, string source, string message, EventLogEntryType type, int eventID ) : void
logName string 이벤트 로그 명
source string 원본
message string 이벤트 메시지
type EventLogEntryType 이벤트 수준(경고, 정보 등)
eventID int 이벤트 ID
return void

WriteEntry() public static method

이벤트 로그를 쓴다.
public static WriteEntry ( string logName, string source, string message, EventLogEntryType type, int eventID, short category ) : void
logName string 이벤트 로그 명
source string 원본
message string 이벤트 메시지
type EventLogEntryType 이벤트 수준(경고, 정보 등)
eventID int 이벤트 ID
category short 이벤트 분류
return void

WriteEntry() public static method

이벤트 로그를 쓴다.
public static WriteEntry ( string logName, string source, string message, EventLogEntryType type, int eventID, short category, byte rawData ) : void
logName string 이벤트 로그 명
source string 원본
message string 이벤트 메시지
type EventLogEntryType 이벤트 수준(경고, 정보 등)
eventID int 이벤트 ID
category short 이벤트 분류
rawData byte
return void