Table of Contents

Class ILoggerUtility

Namespace
Songhay
Assembly
SonghayCore.dll

Centralized routines for ILogger

public static class ILoggerUtility
Inheritance
ILoggerUtility
Inherited Members

Methods

AsInstanceOrNullLogger(ILogger?)

When the specified ILogger is null, fallback to Microsoft’s NullLogger.

public static ILogger AsInstanceOrNullLogger(ILogger? logger)

Parameters

logger ILogger

the specified ILogger

Returns

ILogger

AsInstanceOrNullLogger<TCategory>(ILogger<TCategory>?)

When the specified ILogger<TCategoryName> is null, fallback to Microsoft’s NullLogger<T>.

public static ILogger<TCategory> AsInstanceOrNullLogger<TCategory>(ILogger<TCategory>? logger)

Parameters

logger ILogger<TCategory>

the specified ILogger

Returns

ILogger<TCategory>

Type Parameters

TCategory

logging category by type