@@ -0,0 +1,27 @@
|
||||
using MsLogLevel = Microsoft.Extensions.Logging.LogLevel;
|
||||
|
||||
namespace ROLAC.API.Services.Logging;
|
||||
|
||||
/// <summary>
|
||||
/// Bound from configuration section <c>Logging:Database</c>. Controls what the DB sink persists.
|
||||
/// </summary>
|
||||
public sealed class DatabaseLoggerOptions
|
||||
{
|
||||
/// <summary>The minimum level actually written to the SystemLogs table. Default: Warning.</summary>
|
||||
public MsLogLevel MinimumLevel { get; set; } = MsLogLevel.Warning;
|
||||
|
||||
/// <summary>
|
||||
/// Category prefixes never persisted — prevents recursion and log-storms. The DB sink
|
||||
/// excludes EF/Npgsql (their SQL firehose), the ASP.NET request firehose, and its own
|
||||
/// writer namespace.
|
||||
/// </summary>
|
||||
public string[] ExcludedCategories { get; set; } =
|
||||
[
|
||||
"Microsoft.EntityFrameworkCore",
|
||||
"Npgsql",
|
||||
"Microsoft.AspNetCore.Hosting.Diagnostics",
|
||||
"Microsoft.AspNetCore.Routing",
|
||||
"ROLAC.API.Services.Logging",
|
||||
"ROLAC.API.Data.Logging",
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user