Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IProfilingLogger

    Defines the profiling logging service.

    Namespace: Umbraco.Cms.Core.Logging
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IProfilingLogger

    Methods

    View Source

    DebugDuration(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 null if debug logging is disabled.

    View Source

    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 null if debug logging is disabled.

    Type Parameters
    Name Description
    T

    The type to use as the logger category.

    View Source

    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 null if debug logging is disabled.

    Type Parameters
    Name Description
    T

    The type to use as the logger category.

    View Source

    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

    true if enabled; otherwise, false.

    View Source

    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.

    View Source

    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.

    View Source

    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.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX