修复 工单第一次连接失败bug
增加工单内log
This commit is contained in:
1 parent
324ca0c6e7
commit
6e5dfa92b8
11 files changed
+566
-560
No files matched your search
@@ -0,0 +1,13 @@
|
||||
namespace WxOrder.Framework.Helpers;
|
||||
|
||||
public interface ILogger
|
||||
{
|
||||
void Debug(string message, Exception exception = null);
|
||||
void Dispose();
|
||||
void Error(string message, Exception exception = null);
|
||||
void Fatal(string message, Exception exception = null);
|
||||
void Info(string message, Exception exception = null);
|
||||
void Log(string message, LogMessageLevel level, Exception exception = null);
|
||||
void Trace(string message, Exception exception = null);
|
||||
void Warn(string message, Exception exception = null);
|
||||
}
|
||||
@@ -32,7 +32,7 @@ namespace WxOrder.Framework.Helpers
|
||||
/// 日志文件按日期分目录存放,并在跨天时自动切换:
|
||||
/// {logDirectory}/yyyy-MM/yyyy-MM-dd.log,例如 log/2022-12/2022-12-12.log
|
||||
/// </summary>
|
||||
public sealed class NLogger : IDisposable
|
||||
public sealed class NLogger : IDisposable, ILogger
|
||||
{
|
||||
private const string DefaultName = "Default";
|
||||
|
||||
@@ -77,9 +77,9 @@ namespace WxOrder.Framework.Helpers
|
||||
/// <summary> 日志名称(写入每行日志中,用于区分来源,不再决定文件名)。 </summary>
|
||||
public string Name { get; }
|
||||
|
||||
public bool IsDebugEnabled { get; set; } = true;
|
||||
public bool IsDebugEnabled { get; set; } = false;
|
||||
|
||||
public bool IsDebugWriteLineEnabled { get; set; } = true;
|
||||
public bool IsDebugWriteLineEnabled { get; set; } = false;
|
||||
|
||||
public LogMessageLevel MinimumLevel { get; set; } = LogMessageLevel.Trace;
|
||||
|
||||
|
||||
Reference in new issue
Block a user