Show / Hide Table of Contents

Class LoggingExtensions

Logging extensions.

Inheritance
System.Object
LoggingExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Logging
Assembly: Kephas.Core.dll
Syntax
public static class LoggingExtensions

Methods

| Improve this Doc View Source

GetLogger(Object, IContext)

An Object extension method that gets a logger.

Declaration
public static ILogger GetLogger(this object obj, IContext context = null)
Parameters
Type Name Description
System.Object obj

The object to act on.

IContext context

The context used to get the log manager (optional).

Returns
Type Description
ILogger

The logger.

Remarks

Use this method only if the object cannot get a logger through dependency injection.

| Improve this Doc View Source

GetLogger(Type, IContext)

A Type extension method that gets a logger.

Declaration
public static ILogger GetLogger(this Type type, IContext context = null)
Parameters
Type Name Description
System.Type type

The type to act on.

IContext context

The context used to get the log manager (optional).

Returns
Type Description
ILogger

The logger.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX