DevToys logo DevToys
  • Home
  • Blog
  • Documentation
  • Download
Search Results for

    Show / Hide Table of Contents

    Class LoggingExtensions

    Provides extension methods for logging.

    Inheritance
    object
    LoggingExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DevToys.Api
    Assembly: DevToys.Api.dll
    Syntax
    public static class LoggingExtensions

    Properties

    LoggerFactory

    Sets the ILoggerFactory.

    Declaration
    public static ILoggerFactory LoggerFactory { set; }
    Property Value
    Type Description
    ILoggerFactory

    Methods

    Log(Type)

    Creates an instance of ILogger for the specified type.

    Declaration
    public static ILogger Log(this Type forType)
    Parameters
    Type Name Description
    Type forType

    The type to create the logger for.

    Returns
    Type Description
    ILogger

    An instance of ILogger.

    Log<T>(T)

    Creates an instance of ILogger for the given object's type.

    Declaration
    public static ILogger Log<T>(this T instance)
    Parameters
    Type Name Description
    T instance

    The object instance.

    Returns
    Type Description
    ILogger

    An instance of ILogger.

    Type Parameters
    Name Description
    T

    The type of the object.

    In this article
    DevToys logo © 2024 DevToys