NullLoggerFactory Class

Definition

An ILoggerFactory used to create instance of NullLogger that logs nothing.

public ref class NullLoggerFactory : IDisposable, Microsoft::Extensions::Logging::ILoggerFactory
public class NullLoggerFactory : IDisposable, Microsoft.Extensions.Logging.ILoggerFactory
type NullLoggerFactory = class
    interface ILoggerFactory
    interface IDisposable
Public Class NullLoggerFactory
Implements IDisposable, ILoggerFactory
Inheritance
NullLoggerFactory
Implements

Constructors

NullLoggerFactory()

Creates a new NullLoggerFactory instance.

Fields

Instance

Returns the shared instance of NullLoggerFactory.

Methods

AddProvider(ILoggerProvider)
CreateLogger(String)
Dispose()
Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Extension Methods

AddAzureWebAppDiagnostics(ILoggerFactory)

Adds an Azure Web Apps diagnostics logger.

AddAzureWebAppDiagnostics(ILoggerFactory, AzureAppServicesDiagnosticsSettings)

Adds an Azure Web Apps diagnostics logger.

AddConsole(ILoggerFactory)

Adds a console logger that is enabled for LogLevel.Information or higher.

AddConsole(ILoggerFactory, IConfiguration)
AddConsole(ILoggerFactory, IConsoleLoggerSettings)
AddConsole(ILoggerFactory, LogLevel)

Adds a console logger that is enabled for LogLevels of minLevel or higher.

AddConsole(ILoggerFactory, LogLevel, Boolean)

Adds a console logger that is enabled for LogLevels of minLevel or higher.

AddConsole(ILoggerFactory, Boolean)

Adds a console logger that is enabled for LogLevel.Information or higher.

AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>)

Adds a console logger that is enabled as defined by the filter function.

AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>, Boolean)

Adds a console logger that is enabled as defined by the filter function.

AddDebug(ILoggerFactory)

Adds a debug logger that is enabled for LogLevel.Information or higher.

AddDebug(ILoggerFactory, LogLevel)

Adds a debug logger that is enabled for LogLevels of minLevel or higher.

AddDebug(ILoggerFactory, Func<String,LogLevel,Boolean>)

Adds a debug logger that is enabled as defined by the filter function.

AddEventLog(ILoggerFactory)

Adds an event logger that is enabled for LogLevel.Information or higher.

AddEventLog(ILoggerFactory, EventLogSettings)

Adds an event logger. Use settings to enable logging for specific LogLevels.

AddEventLog(ILoggerFactory, LogLevel)

Adds an event logger that is enabled for LogLevels of minLevel or higher.

AddEventSourceLogger(ILoggerFactory)

Adds an event logger that is enabled for LogLevel.Information or higher.

CreateLogger(ILoggerFactory, Type)

Creates a new ILogger instance using the full name of the given type.

CreateLogger<T>(ILoggerFactory)

Creates a new ILogger instance using the full name of the given type.

AddTraceSource(ILoggerFactory, SourceSwitch)
AddTraceSource(ILoggerFactory, SourceSwitch, TraceListener)
AddTraceSource(ILoggerFactory, String)
AddTraceSource(ILoggerFactory, String, TraceListener)

Applies to