Interface IProfilingLogger
Defines the profiling logging service.
Namespace: Umbraco.Cms.Core.Logging
Assembly: Umbraco.Core.dll
Syntax
public interface IProfilingLogger
Methods
View SourceDebugDuration(Type, string, string, string?, int, object[]?, object[]?, object[]?)
Profiles an action and log as debug messages.
Declaration
DisposableTimer? DebugDuration(Type loggerType, string startMessage, string completeMessage, string? failMessage = null, int thresholdMilliseconds = 0, object[]? startMessageArgs = null, object[]? endMessageArgs = null, object[]? failMessageArgs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | loggerType | The type to use as the logger category. |
| string | startMessage | The message to log when the timer starts. |
| string | completeMessage | The message to log when the timer ends successfully. |
| string | failMessage | The message to log if the operation fails. |
| int | thresholdMilliseconds | Minimum elapsed time in milliseconds before logging the end message. |
| object[] | startMessageArgs | Arguments for the start message template. |
| object[] | endMessageArgs | Arguments for the end message template. |
| object[] | failMessageArgs | Arguments for the fail message template. |
Returns
| Type | Description |
|---|---|
| DisposableTimer | A DisposableTimer that logs completion when disposed, or |
DebugDuration<T>(string, object[]?)
Profiles an action and log as debug messages.
Declaration
DisposableTimer? DebugDuration<T>(string startMessage, object[]? startMessageArgs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | startMessage | The message to log when the timer starts. |
| object[] | startMessageArgs | Arguments for the start message template. |
Returns
| Type | Description |
|---|---|
| DisposableTimer | A DisposableTimer that logs completion when disposed, or |
Type Parameters
| Name | Description |
|---|---|
| T | The type to use as the logger category. |
DebugDuration<T>(string, string, string?, int, object[]?, object[]?, object[]?)
Profiles an action and log as debug messages.
Declaration
DisposableTimer? DebugDuration<T>(string startMessage, string completeMessage, string? failMessage = null, int thresholdMilliseconds = 0, object[]? startMessageArgs = null, object[]? endMessageArgs = null, object[]? failMessageArgs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | startMessage | The message to log when the timer starts. |
| string | completeMessage | The message to log when the timer ends successfully. |
| string | failMessage | The message to log if the operation fails. |
| int | thresholdMilliseconds | Minimum elapsed time in milliseconds before logging the end message. |
| object[] | startMessageArgs | Arguments for the start message template. |
| object[] | endMessageArgs | Arguments for the end message template. |
| object[] | failMessageArgs | Arguments for the fail message template. |
Returns
| Type | Description |
|---|---|
| DisposableTimer | A DisposableTimer that logs completion when disposed, or |
Type Parameters
| Name | Description |
|---|---|
| T | The type to use as the logger category. |
IsEnabled(LogLevel)
Checks if the given logLevel is enabled.
Declaration
bool IsEnabled(LogLevel logLevel)
Parameters
| Type | Name | Description |
|---|---|---|
| LogLevel | logLevel | Level to be checked. |
Returns
| Type | Description |
|---|---|
| bool |
|
TraceDuration(Type, string, string, string?, object[]?, object[]?, object[]?)
Profiles an action and log as information messages.
Declaration
DisposableTimer TraceDuration(Type loggerType, string startMessage, string completeMessage, string? failMessage = null, object[]? startMessageArgs = null, object[]? endMessageArgs = null, object[]? failMessageArgs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | loggerType | The type to use as the logger category. |
| string | startMessage | The message to log when the timer starts. |
| string | completeMessage | The message to log when the timer ends successfully. |
| string | failMessage | The message to log if the operation fails. |
| object[] | startMessageArgs | Arguments for the start message template. |
| object[] | endMessageArgs | Arguments for the end message template. |
| object[] | failMessageArgs | Arguments for the fail message template. |
Returns
| Type | Description |
|---|---|
| DisposableTimer | A DisposableTimer that logs completion when disposed. |
TraceDuration<T>(string, object[]?)
Profiles an action and log as information messages.
Declaration
DisposableTimer TraceDuration<T>(string startMessage, object[]? startMessageArgs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | startMessage | The message to log when the timer starts. |
| object[] | startMessageArgs | Arguments for the start message template. |
Returns
| Type | Description |
|---|---|
| DisposableTimer | A DisposableTimer that logs completion when disposed. |
Type Parameters
| Name | Description |
|---|---|
| T | The type to use as the logger category. |
TraceDuration<T>(string, string, string?, object[]?, object[]?, object[]?)
Profiles an action and log as information messages.
Declaration
DisposableTimer TraceDuration<T>(string startMessage, string completeMessage, string? failMessage = null, object[]? startMessageArgs = null, object[]? endMessageArgs = null, object[]? failMessageArgs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | startMessage | The message to log when the timer starts. |
| string | completeMessage | The message to log when the timer ends successfully. |
| string | failMessage | The message to log if the operation fails. |
| object[] | startMessageArgs | Arguments for the start message template. |
| object[] | endMessageArgs | Arguments for the end message template. |
| object[] | failMessageArgs | Arguments for the fail message template. |
Returns
| Type | Description |
|---|---|
| DisposableTimer | A DisposableTimer that logs completion when disposed. |
Type Parameters
| Name | Description |
|---|---|
| T | The type to use as the logger category. |