Show / Hide Table of Contents

Class Logger

An ASP net logger.

Inheritance
System.Object
Logger
Implements
Microsoft.Extensions.Logging.ILogger
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.Application.AspNetCore.Logging
Assembly: Kephas.Application.AspNetCore.dll
Syntax
public class Logger : ILogger

Constructors

| Improve this Doc View Source

Logger(ILogger)

Initializes a new instance of the Logger class.

Declaration
public Logger(ILogger logger)
Parameters
Type Name Description
ILogger logger

The logger.

Methods

| Improve this Doc View Source

BeginScope<TState>(TState)

Begins a logical operation scope.

Declaration
public IDisposable BeginScope<TState>(TState state)
Parameters
Type Name Description
TState state

The identifier for the scope.

Returns
Type Description
System.IDisposable

An IDisposable that ends the logical operation scope on dispose.

Type Parameters
Name Description
TState

Type of the state.

| Improve this Doc View Source

IsEnabled(LogLevel)

Checks if the given logLevel is enabled.

Declaration
public bool IsEnabled(LogLevel logLevel)
Parameters
Type Name Description
Microsoft.Extensions.Logging.LogLevel logLevel

Level to be checked.

Returns
Type Description
System.Boolean

true if enabled.

| Improve this Doc View Source

Log<TState>(LogLevel, EventId, TState, Exception, Func<TState, Exception, String>)

Writes a log entry.

Declaration
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Parameters
Type Name Description
Microsoft.Extensions.Logging.LogLevel logLevel

Entry will be written on this level.

Microsoft.Extensions.Logging.EventId eventId

Id of the event.

TState state

The entry to be written. Can be also an object.

System.Exception exception

The exception related to this entry.

System.Func<TState, System.Exception, System.String> formatter

Function to create a string message of the state and exception.

Type Parameters
Name Description
TState

Type of the state.

Implements

Microsoft.Extensions.Logging.ILogger

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX