C# 클래스 Aspectacular.LogOutputAspectBase

Use this class as a base for creating loggers - subclasses that take proxy log item collection and store them to whatever medium you need. Override Output(string) method in your subclasses to write the log text to the specific medium, Like Debug, Trace, log4net, Windows Event Log, etc.
상속: Aspect
파일 보기 프로젝트 열기: vgribok/Aspectacular

공개 프로퍼티들

프로퍼티 타입 설명
entryTypeFilter EntryType
keys string[]
writeAllEntriesIfKeyFound bool

공개 메소드들

메소드 설명
Step_7_AfterEverythingSaidAndDone ( ) : void

보호된 메소드들

메소드 설명
FilterLogEntries ( List entries ) : IEnumerable

Whittles down log item collection according with values of entryTypeFilter, keys, and writeAllEntriesIfKeyFound.

GetTextEntries ( List entries ) : IEnumerable
LogOutputAspectBase ( EntryType typeOfEntriesToOutput, bool writeAllEntriesIfKeyFound, IEnumerable optionalKey ) : System

Initializes log output base class

Output ( string logText ) : void

Implement this method in the subclass to write actual log text to the destination.

메소드 상세

FilterLogEntries() 보호된 메소드

Whittles down log item collection according with values of entryTypeFilter, keys, and writeAllEntriesIfKeyFound.
protected FilterLogEntries ( List entries ) : IEnumerable
entries List
리턴 IEnumerable

GetTextEntries() 보호된 메소드

protected GetTextEntries ( List entries ) : IEnumerable
entries List
리턴 IEnumerable

LogOutputAspectBase() 보호된 메소드

Initializes log output base class
protected LogOutputAspectBase ( EntryType typeOfEntriesToOutput, bool writeAllEntriesIfKeyFound, IEnumerable optionalKey ) : System
typeOfEntriesToOutput EntryType Desired combination of EntryType to filter items to be collected for outputting.
writeAllEntriesIfKeyFound bool /// If true and optionalKey is specified, the entire log collection is written if key is found in the collection. /// If false and optionalKey is specified, only log items with the key will be written. ///
optionalKey IEnumerable /// Optional item keys to output or to decide whether log collection needs to be written to /// output. All items are written if not specified. ///
리턴 System

Output() 보호된 추상적인 메소드

Implement this method in the subclass to write actual log text to the destination.
protected abstract Output ( string logText ) : void
logText string Text representing the log collection of the intercepted call.
리턴 void

Step_7_AfterEverythingSaidAndDone() 공개 메소드

public Step_7_AfterEverythingSaidAndDone ( ) : void
리턴 void

프로퍼티 상세

entryTypeFilter 공개적으로 프로퍼티

public EntryType entryTypeFilter
리턴 EntryType

keys 공개적으로 프로퍼티

public string[] keys
리턴 string[]

writeAllEntriesIfKeyFound 공개적으로 프로퍼티

public bool writeAllEntriesIfKeyFound
리턴 bool