ソースを参照

修改Log日志存储目录不准确问题

yuzhengyang 7 年 前
コミット
8dc0619c80

BIN
Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide


BIN
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide


+ 3 - 4
Fork.Net/Azylee.Utils/Azylee.Core/LogUtils/SimpleLogUtils/Log.cs

@@ -60,11 +60,10 @@ namespace Azylee.Core.LogUtils.SimpleLogUtils
 
         public Log()
         { }
-        public Log(bool isWrite, string logPath = LOG_PATH, LogLevel level = LogLevel.All)
+        public Log(bool isWrite, LogLevel level = LogLevel.All)
         {
-            if (isWrite && !string.IsNullOrWhiteSpace(logPath))
+            if (isWrite)
             {
-                LogPath = logPath.Trim();
                 IsWriteFile = true;
                 LogLevel = level;
             }
@@ -100,7 +99,7 @@ namespace Azylee.Core.LogUtils.SimpleLogUtils
             if (IsStart)
                 IsStart = false;
         }
-        public bool SetWriteFile(bool isWrite, string logPath)
+        public bool SetWriteFile(string logPath, bool isWrite = true)
         {
             if (isWrite && !string.IsNullOrWhiteSpace(logPath))
             {