C# Class Aspectacular.CallLifetimeLog

Base class collecting entries with text information logged by aspects, proxy, callers and the intercepted method.
Afficher le fichier Open project: vgribok/Aspectacular Class Usage Examples

Méthodes publiques

Свойство Type Description
FallbackToTraceLoggingWhenNoProxy bool
callLog List

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

Log() protected méthode

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
Résultat void

LogError() protected méthode

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
Résultat void

LogErrorWithKey() protected méthode

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
Résultat void

LogInformation() protected méthode

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
Résultat void

LogInformationData() protected méthode

Logs a piece of data as a log entry with key.
protected LogInformationData ( string key, object val ) : void
key string
val object
Résultat void

LogInformationWithKey() protected méthode

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
Résultat void

LogWarning() protected méthode

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
Résultat void

LogWarningWithKey() protected méthode

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
Résultat void

Property Details

FallbackToTraceLoggingWhenNoProxy public_oe static_oe property

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
Résultat bool

callLog public_oe property

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
Résultat List