This commit is contained in:
@@ -108,6 +108,10 @@ namespace AyaNova
|
||||
var logRuleFilterOutMicrosoftEfCoreDbUpdateExceptions = new LoggingRule("Microsoft.EntityFrameworkCore.DbUpdateException", NLog.LogLevel.Trace, NLog.LogLevel.Error, nullTarget);
|
||||
logRuleFilterOutMicrosoftEfCoreDbUpdateExceptions.Final = true;
|
||||
|
||||
//this rule is only intended to filter out this incorrect exception:
|
||||
//2019-01-16 16:13:03.4808|WARN|Microsoft.EntityFrameworkCore.Query|Query: '(from Widget <generated>_4 in DbSet<Widget> select [<generated>_4]).Skip(__p_1).Take(__p_2)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results.
|
||||
var logRuleFilterOutMicrosoftEfCoreQueryExceptions = new LoggingRule("Microsoft.EntityFrameworkCore.Query", NLog.LogLevel.Trace, NLog.LogLevel.Error, nullTarget);
|
||||
logRuleFilterOutMicrosoftEfCoreQueryExceptions.Final = true;
|
||||
|
||||
|
||||
//Log all other regular items at selected level
|
||||
@@ -127,6 +131,7 @@ namespace AyaNova
|
||||
logConfig.LoggingRules.Add(logRuleFilterOutMicrosoftEfCoreConcurrencyExceptions);
|
||||
logConfig.LoggingRules.Add(logRuleFilterOutMicrosoftEfCoreCommandExceptions);
|
||||
logConfig.LoggingRules.Add(logRuleFilterOutMicrosoftEfCoreDbUpdateExceptions);
|
||||
logConfig.LoggingRules.Add(logRuleFilterOutMicrosoftEfCoreQueryExceptions);
|
||||
}
|
||||
|
||||
logConfig.LoggingRules.Add(logRuleAyaNovaItems);
|
||||
|
||||
Reference in New Issue
Block a user