Show / Hide Table of Contents

Class NullLogger

ILogger implementation that does not log messages

Inheritance
object
NullLogger
Implements
ILogger
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SlipeServer.Server.Loggers
Assembly: SlipeServer.Server.dll
Syntax
public class NullLogger : ILogger

Methods

| Edit this page 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
IDisposable

An IDisposable that ends the logical operation scope on dispose.

Type Parameters
Name Description
TState

The type of the state to begin scope for.

| Edit this page View Source

IsEnabled(LogLevel)

Checks if the given logLevel is enabled.

Declaration
public bool IsEnabled(LogLevel logLevel)
Parameters
Type Name Description
LogLevel logLevel

Level to be checked.

Returns
Type Description
bool

true if enabled.

| Edit this page 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
LogLevel logLevel

Entry will be written on this level.

EventId eventId

Id of the event.

TState state

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

Exception exception

The exception related to this entry.

Func<TState, Exception, string> formatter

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

Type Parameters
Name Description
TState

The type of the object to be written.

Implements

ILogger
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX