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
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
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