C# Класс Aspectacular.CallLifetimeLog

Base class collecting entries with text information logged by aspects, proxy, callers and the intercepted method.
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
FallbackToTraceLoggingWhenNoProxy bool
callLog List

Защищенные методы

Метод Описание
Log ( EntryType entryType, string category, string format ) : void

Adds log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.

LogError ( string format ) : void

Adds error log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.

LogErrorWithKey ( string category, string format ) : void

Adds error log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.

LogInformation ( string format ) : void

Adds information log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.

LogInformationData ( string key, object val ) : void

Logs a piece of data as a log entry with key.

LogInformationWithKey ( string category, string format ) : void

Adds information log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.

LogWarning ( string format ) : void

Adds warning log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.

LogWarningWithKey ( string category, string format ) : void

Adds warning log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.

Приватные методы

Метод Описание
AddEntryIntrenal ( LogEntryOriginator who, Type optionalAspectType, EntryType entryType, string category, string format ) : void
AddLogEntry ( Aspect who, EntryType entryType, string category, string format ) : void
AddLogEntry ( LogEntryOriginator who, EntryType entryType, string category, string format ) : void
GetLogText ( string lineSeparator, Func entrySelector = null ) : string

Generates log text from a collection of log entries specified by entrySelector delegate. If entrySelector is null, all entries are used generate log text. Environment.NewLine as line separator.

Описание методов

Log() защищенный Метод

Adds log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.
protected Log ( EntryType entryType, string category, string format ) : void
entryType EntryType
category string
format string
Результат void

LogError() защищенный Метод

Adds error log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.
protected LogError ( string format ) : void
format string
Результат void

LogErrorWithKey() защищенный Метод

Adds error log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.
protected LogErrorWithKey ( string category, string format ) : void
category string
format string
Результат void

LogInformation() защищенный Метод

Adds information log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.
protected LogInformation ( string format ) : void
format string
Результат void

LogInformationData() защищенный Метод

Logs a piece of data as a log entry with key.
protected LogInformationData ( string key, object val ) : void
key string
val object
Результат void

LogInformationWithKey() защищенный Метод

Adds information log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.
protected LogInformationWithKey ( string category, string format ) : void
category string
format string
Результат void

LogWarning() защищенный Метод

Adds warning log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.
protected LogWarning ( string format ) : void
format string
Результат void

LogWarningWithKey() защищенный Метод

Adds warning log entry to AOP Proxy log in a way that makes it possible for aspect classes to access it for storing, sorting, grouping, etc.
protected LogWarningWithKey ( string category, string format ) : void
category string
format string
Результат void

Описание свойств

FallbackToTraceLoggingWhenNoProxy публичное статическое свойство

If true, logging done by methods will be outputted to the System.Diagnostic.Trace if the methods are called w/o Aspectacular AOP.
When methods that log using ICallLogger or Proxy.CurrentLog are called without AOP Proxy, this flag allows this logging to go to Trace instead of being lost. Set this flag to false for backward compatibility - to have the behavior as of before this change (where logs are thrown away).
public static bool FallbackToTraceLoggingWhenNoProxy
Результат bool

callLog публичное свойство

Collection of log entries populated during intercepted call lifecycle. It's populated by the Proxy, Aspects, and sometimes by the method itself or the caller.
public List callLog
Результат List