C# Class Aspectacular.CallLifetimeLog

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

Public Properties

Property Type Description
FallbackToTraceLoggingWhenNoProxy bool
callLog List

Protected Methods

Method 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

Method 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 method

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
return void

LogError() protected method

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
return void

LogErrorWithKey() protected method

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
return void

LogInformation() protected method

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
return void

LogInformationData() protected method

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

LogInformationWithKey() protected method

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
return void

LogWarning() protected method

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
return void

LogWarningWithKey() protected method

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
return 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
return 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
return List