C# 클래스 NSoft.NFramework.WindowsSystem.EventLogTool

RwEventLog를 이용하여, Windows Event Log를 쉽게 사용할 수 있는 Utility Class 입니다.
파일 보기 프로젝트 열기: debop/NFramework 1 사용 예제들

공개 메소드들

메소드 설명
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

이벤트 로그를 쓴다.

메소드 상세

FindEntryByEntryType() 공개 정적인 메소드

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

FindEntryByEntryType() 공개 정적인 메소드

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

FindEntryByGeneratedTime() 공개 정적인 메소드

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

FindEntryByGeneratedTime() 공개 정적인 메소드

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 기준시간 전/후를 판단하는 옵션
리턴 IEnumerable

FindEntryBySource() 공개 정적인 메소드

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

FindEntryBySource() 공개 정적인 메소드

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

GetEventLog() 공개 정적인 메소드

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

GetEventLog() 공개 정적인 메소드

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

GetEventLog() 공개 정적인 메소드

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

SetLogMaxSize() 공개 정적인 메소드

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

WriteEntry() 공개 정적인 메소드

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

WriteEntry() 공개 정적인 메소드

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

WriteEntry() 공개 정적인 메소드

이벤트 로그를 쓴다.
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
리턴 void

WriteEntry() 공개 정적인 메소드

이벤트 로그를 쓴다.
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 이벤트 분류
리턴 void

WriteEntry() 공개 정적인 메소드

이벤트 로그를 쓴다.
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
리턴 void