Class LogLevelLoader
Provides functionality to load and manage log level configurations used by the logging viewer in Umbraco.
Inheritance
object
Namespace: Umbraco.Cms.Core.Logging.Viewer
Assembly: Umbraco.Infrastructure.dll
Syntax
public class LogLevelLoader : ILogLevelLoader
Constructors
View SourceLogLevelLoader(UmbracoFileConfiguration)
Initializes a new instance of the LogLevelLoader class.
Declaration
public LogLevelLoader(UmbracoFileConfiguration umbracoFileConfig)
Parameters
| Type | Name | Description |
|---|---|---|
| UmbracoFileConfiguration | umbracoFileConfig | The configuration object containing settings for Umbraco file-based logging. |
Methods
View SourceGetGlobalMinLogLevel()
Gets the minimum Serilog log event level configured in the config file.
Declaration
[Obsolete("Use ILogViewerService.GetGlobalMinLogLevel instead. Scheduled for removal in Umbraco 15.")]
public LogEventLevel? GetGlobalMinLogLevel()
Returns
| Type | Description |
|---|---|
| LogEventLevel? | The configured minimum Serilog.Events.LogEventLevel for Serilog, or |
GetLogLevelsFromSinks()
Retrieves the configured Serilog log level values for the global minimum and the UmbracoFile sink from the configuration file.
Declaration
[Obsolete("Use ILogViewerService.GetLogLevelsFromSinks instead. Scheduled for removal in Umbraco 15.")]
public ReadOnlyDictionary<string, LogEventLevel?> GetLogLevelsFromSinks()
Returns
| Type | Description |
|---|---|
| ReadOnlyDictionary<string, LogEventLevel?> | A read-only dictionary mapping sink names (e.g., "Global", "UmbracoFile") to their configured Serilog log levels. |