LogActivity Class |
Represents a logged custom activity, i.e. something that a beginning and an end with a specific outcome.
This class is instantiated by the legacy API of the Logger class. For the modern API, see LogActivity<TActivityDescription>.

Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.5.15.0 (6.5.15.0)

C#
public class LogActivity : Logger, IDisposable
The LogActivity type exposes the following members.

Name | Description | |
---|---|---|
![]() | LogActivity |
Initializes a new LogActivity.
|

Name | Description | |
---|---|---|
![]() | Context |
Gets the ILoggingContext created from the current LogActivity.
|
![]() | IsValid |
Determines whether the current LogActivity is valid, i.e. calls to methods
SetFailure() or SetException(Exception) will do something, or will be totally ignored.
|

Name | Description | |
---|---|---|
![]() | Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
![]() | Dispose(Boolean) |
Disposes the current LogActivity.
|
![]() | IsEnabled | (Inherited from Logger.) |
![]() | OpenActivity(String) |
Opens a custom activity with an optional description, but without parameters.
(Inherited from Logger.) |
![]() | OpenActivity(String, Object[]) |
Opens a custom activity with an array of parameters.
(Inherited from Logger.) |
![]() | OpenActivity(LogActivityOptions, String) | (Inherited from Logger.) |
![]() | OpenActivity(LogActivityOptions, String, Object[]) | (Inherited from Logger.) |
![]() | OpenActivity<T1>(String, T1) |
Opens a custom activity with a description containing 1 parameter.
(Inherited from Logger.) |
![]() | OpenActivity<T1>(LogActivityOptions, String, T1) |
Opens a custom activity with 1 parameter.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(String, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) |
Opens a custom activity with a description containing 10 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(LogActivityOptions, String, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) |
Opens a custom activity with 10 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2>(String, T1, T2) |
Opens a custom activity with a description containing 2 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2>(LogActivityOptions, String, T1, T2) |
Opens a custom activity with 2 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3>(String, T1, T2, T3) |
Opens a custom activity with a description containing 3 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3>(LogActivityOptions, String, T1, T2, T3) |
Opens a custom activity with 3 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4>(String, T1, T2, T3, T4) |
Opens a custom activity with a description containing 4 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4>(LogActivityOptions, String, T1, T2, T3, T4) |
Opens a custom activity with 4 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4, T5>(String, T1, T2, T3, T4, T5) |
Opens a custom activity with a description containing 5 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4, T5>(LogActivityOptions, String, T1, T2, T3, T4, T5) |
Opens a custom activity with 5 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4, T5, T6>(String, T1, T2, T3, T4, T5, T6) |
Opens a custom activity with a description containing 6 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4, T5, T6>(LogActivityOptions, String, T1, T2, T3, T4, T5, T6) |
Opens a custom activity with 6 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4, T5, T6, T7>(String, T1, T2, T3, T4, T5, T6, T7) |
Opens a custom activity with a description containing 7 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4, T5, T6, T7>(LogActivityOptions, String, T1, T2, T3, T4, T5, T6, T7) |
Opens a custom activity with 7 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4, T5, T6, T7, T8>(String, T1, T2, T3, T4, T5, T6, T7, T8) |
Opens a custom activity with a description containing 8 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4, T5, T6, T7, T8>(LogActivityOptions, String, T1, T2, T3, T4, T5, T6, T7, T8) |
Opens a custom activity with 8 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4, T5, T6, T7, T8, T9>(String, T1, T2, T3, T4, T5, T6, T7, T8, T9) |
Opens a custom activity with a description containing 9 parameters.
(Inherited from Logger.) |
![]() | OpenActivity<T1, T2, T3, T4, T5, T6, T7, T8, T9>(LogActivityOptions, String, T1, T2, T3, T4, T5, T6, T7, T8, T9) |
Opens a custom activity with 9 parameters.
(Inherited from Logger.) |
![]() | Resume | |
![]() | SetException |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with a given Exception.
|
![]() | SetFailure() |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure with the default failure message.
|
![]() | SetFailure(String) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure and specifies a parameterless failure message.
|
![]() | SetFailure(String, Object[]) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure and specifies a failure message with an array of parameters.
|
![]() | SetFailure<T1>(String, T1) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure and specifies a failure message with 1 parameter.
|
![]() | SetFailure<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(String, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure and specifies a failure message with 10 parameters.
|
![]() | SetFailure<T1, T2>(String, T1, T2) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure and specifies a failure message with 2 parameters.
|
![]() | SetFailure<T1, T2, T3>(String, T1, T2, T3) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure and specifies a failure message with 3 parameters.
|
![]() | SetFailure<T1, T2, T3, T4>(String, T1, T2, T3, T4) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure and specifies a failure message with 4 parameters.
|
![]() | SetFailure<T1, T2, T3, T4, T5>(String, T1, T2, T3, T4, T5) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure and specifies a failure message with 5 parameters.
|
![]() | SetFailure<T1, T2, T3, T4, T5, T6>(String, T1, T2, T3, T4, T5, T6) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure and specifies a failure message with 6 parameters.
|
![]() | SetFailure<T1, T2, T3, T4, T5, T6, T7>(String, T1, T2, T3, T4, T5, T6, T7) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure and specifies a failure message with 7 parameters.
|
![]() | SetFailure<T1, T2, T3, T4, T5, T6, T7, T8>(String, T1, T2, T3, T4, T5, T6, T7, T8) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure and specifies a failure message with 8 parameters.
|
![]() | SetFailure<T1, T2, T3, T4, T5, T6, T7, T8, T9>(String, T1, T2, T3, T4, T5, T6, T7, T8, T9) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with failure and specifies a failure message with 9 parameters.
|
![]() | SetSuccess() |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success with the default success message.
|
![]() | SetSuccess(String) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success and specifies a parameterless success message.
|
![]() | SetSuccess(String, Object[]) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success and specifies a success message with an array of parameters.
|
![]() | SetSuccess<T1>(String, T1) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success and specifies a success message with 1 parameter.
|
![]() | SetSuccess<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(String, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success and specifies a success message with 10 parameters.
|
![]() | SetSuccess<T1, T2>(String, T1, T2) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success and specifies a success message with 2 parameters.
|
![]() | SetSuccess<T1, T2, T3>(String, T1, T2, T3) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success and specifies a success message with 3 parameters.
|
![]() | SetSuccess<T1, T2, T3, T4>(String, T1, T2, T3, T4) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success and specifies a success message with 4 parameters.
|
![]() | SetSuccess<T1, T2, T3, T4, T5>(String, T1, T2, T3, T4, T5) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success and specifies a success message with 5 parameters.
|
![]() | SetSuccess<T1, T2, T3, T4, T5, T6>(String, T1, T2, T3, T4, T5, T6) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success and specifies a success message with 6 parameters.
|
![]() | SetSuccess<T1, T2, T3, T4, T5, T6, T7>(String, T1, T2, T3, T4, T5, T6, T7) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success and specifies a success message with 7 parameters.
|
![]() | SetSuccess<T1, T2, T3, T4, T5, T6, T7, T8>(String, T1, T2, T3, T4, T5, T6, T7, T8) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success and specifies a success message with 8 parameters.
|
![]() | SetSuccess<T1, T2, T3, T4, T5, T6, T7, T8, T9>(String, T1, T2, T3, T4, T5, T6, T7, T8, T9) |
Ends an activity (opened with OpenActivity(String) or OpenAsyncActivity(String)
with success and specifies a success message with 9 parameters.
|
![]() | Suspend | |
![]() | ToLogSource | (Inherited from Logger.) |
![]() | Write(LogLevel, String) |
Writes a custom log record without parameters.
(Inherited from Logger.) |
![]() | Write(LogLevel, String, Object[]) |
Writes a custom log record with an array of parameters.
(Inherited from Logger.) |
![]() | Write<T1>(LogLevel, String, T1) |
Writes a custom log record with 1 parameter.
(Inherited from Logger.) |
![]() | Write<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(LogLevel, String, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) |
Writes a custom log record with 10 parameters.
(Inherited from Logger.) |
![]() | Write<T1, T2>(LogLevel, String, T1, T2) |
Writes a custom log record with 2 parameters.
(Inherited from Logger.) |
![]() | Write<T1, T2, T3>(LogLevel, String, T1, T2, T3) |
Writes a custom log record with 3 parameters.
(Inherited from Logger.) |
![]() | Write<T1, T2, T3, T4>(LogLevel, String, T1, T2, T3, T4) |
Writes a custom log record with 4 parameters.
(Inherited from Logger.) |
![]() | Write<T1, T2, T3, T4, T5>(LogLevel, String, T1, T2, T3, T4, T5) |
Writes a custom log record with 5 parameters.
(Inherited from Logger.) |
![]() | Write<T1, T2, T3, T4, T5, T6>(LogLevel, String, T1, T2, T3, T4, T5, T6) |
Writes a custom log record with 6 parameters.
(Inherited from Logger.) |
![]() | Write<T1, T2, T3, T4, T5, T6, T7>(LogLevel, String, T1, T2, T3, T4, T5, T6, T7) |
Writes a custom log record with 7 parameters.
(Inherited from Logger.) |
![]() | Write<T1, T2, T3, T4, T5, T6, T7, T8>(LogLevel, String, T1, T2, T3, T4, T5, T6, T7, T8) |
Writes a custom log record with 8 parameters.
(Inherited from Logger.) |
![]() | Write<T1, T2, T3, T4, T5, T6, T7, T8, T9>(LogLevel, String, T1, T2, T3, T4, T5, T6, T7, T8, T9) |
Writes a custom log record with 9 parameters.
(Inherited from Logger.) |
![]() | WriteException(LogLevel, Exception, String) |
Writes a custom record without parameters and associates it with an Exception.
(Inherited from Logger.) |
![]() | WriteException(LogLevel, Exception, String, Object[]) |
Writes a custom record with an array of parameters and associates it with an Exception.
(Inherited from Logger.) |
![]() | WriteException<T1>(LogLevel, Exception, String, T1) |
Writes a custom log record with 1 parameter and associates it with an Exception.
(Inherited from Logger.) |
![]() | WriteException<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(LogLevel, Exception, String, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) |
Writes a custom log record with 10 parameters and associates it with an Exception.
(Inherited from Logger.) |
![]() | WriteException<T1, T2>(LogLevel, Exception, String, T1, T2) |
Writes a custom log record with 2 parameters and associates it with an Exception.
(Inherited from Logger.) |
![]() | WriteException<T1, T2, T3>(LogLevel, Exception, String, T1, T2, T3) |
Writes a custom log record with 3 parameters and associates it with an Exception.
(Inherited from Logger.) |
![]() | WriteException<T1, T2, T3, T4>(LogLevel, Exception, String, T1, T2, T3, T4) |
Writes a custom log record with 4 parameters and associates it with an Exception.
(Inherited from Logger.) |
![]() | WriteException<T1, T2, T3, T4, T5>(LogLevel, Exception, String, T1, T2, T3, T4, T5) |
Writes a custom log record with 5 parameters and associates it with an Exception.
(Inherited from Logger.) |
![]() | WriteException<T1, T2, T3, T4, T5, T6>(LogLevel, Exception, String, T1, T2, T3, T4, T5, T6) |
Writes a custom log record with 6 parameters and associates it with an Exception.
(Inherited from Logger.) |
![]() | WriteException<T1, T2, T3, T4, T5, T6, T7>(LogLevel, Exception, String, T1, T2, T3, T4, T5, T6, T7) |
Writes a custom log record with 7 parameters and associates it with an Exception.
(Inherited from Logger.) |
![]() | WriteException<T1, T2, T3, T4, T5, T6, T7, T8>(LogLevel, Exception, String, T1, T2, T3, T4, T5, T6, T7, T8) |
Writes a custom log record with 8 parameters and associates it with an Exception.
(Inherited from Logger.) |
![]() | WriteException<T1, T2, T3, T4, T5, T6, T7, T8, T9>(LogLevel, Exception, String, T1, T2, T3, T4, T5, T6, T7, T8, T9) |
Writes a custom log record with 9 parameters and associates it with an Exception.
(Inherited from Logger.) |
![]() | WriteExecutionPoint |
Emits a log record with the source file and line of the caller.
(Inherited from Logger.) |
