Skip to content

DiGi.Serilog.Classes

github-actions[bot] edited this page Jul 15, 2026 · 2 revisions

DiGi.Serilog.Classes Namespace

Classes

LoggerManager Class

Manages the creation and retrieval of logger instances associated with specific assemblies.

public class LoggerManager

Inheritance System.Object → LoggerManager

Methods

LoggerManager.GetLogger(Assembly, bool) Method

Retrieves an existing logger for the specified assembly or creates a new one if requested.

public Serilog.Core.Logger? GetLogger(System.Reflection.Assembly? assembly, bool create=true);

Parameters

assembly System.Reflection.Assembly

The assembly used to determine the directory and path for the log file.

create System.Boolean

A value indicating whether a new logger should be created if an existing one is not found. Defaults to true.

Returns

Serilog.Core.Logger
The Serilog.Core.Logger instance associated with the assembly, or null if the assembly is null, the path cannot be determined, or creation is disabled and no logger exists.

Clone this wiki locally