更新 Admin.NET/Admin.NET.Core/Logging/LoggingSetup.cs
修复潜在的日志写入数据库问题
This commit is contained in:
parent
c82f92eb3b
commit
312038c041
@ -88,6 +88,12 @@ public static class LoggingSetup
|
||||
options.WithTraceId = true; // 显示线程Id
|
||||
options.WithStackFrame = true; // 显示程序集
|
||||
options.IgnoreReferenceLoop = false; // 忽略循环检测
|
||||
options.MessageFormat = (logMsg) =>
|
||||
{
|
||||
var stringBuilder = new StringBuilder();
|
||||
stringBuilder.AppendLine(logMsg.Message);
|
||||
return stringBuilder.ToString();
|
||||
};
|
||||
options.WriteFilter = (logMsg) =>
|
||||
{
|
||||
return logMsg.LogName == CommonConst.SysLogCategoryName; // 只写LoggingMonitor日志
|
||||
|
||||
Loading…
Reference in New Issue
Block a user