Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/ServiceControl.Infrastructure/LoggingConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ public static LoggingConfiguration BuildConfiguration(string logFileName, string
FinalMinLevel = LogLevel.Warn
};

var efCoreRule = new LoggingRule()
{
LoggerNamePattern = "Microsoft.EntityFrameworkCore.*",
FinalMinLevel = LogLevel.Warn
};

// The authorization audit trail is emitted on a dedicated category, separate from the plain-text
// operational log, so it can be shipped to a SIEM without the two streams polluting each other.
// Each event is already a complete ECS JSON document (built in AuthorizationAuditLog); the target
Expand Down Expand Up @@ -121,6 +127,7 @@ public static LoggingConfiguration BuildConfiguration(string logFileName, string

nlogConfig.LoggingRules.Add(aspNetCoreRule);
nlogConfig.LoggingRules.Add(httpClientRule);
nlogConfig.LoggingRules.Add(efCoreRule);
nlogConfig.LoggingRules.Add(auditRule);

nlogConfig.LoggingRules.Add(new LoggingRule("*", logLevel, consoleTarget));
Expand Down
Loading