浏览代码

Added some utilities for accessing log files.

Kenric Nugteren 6 月之前
父节点
当前提交
dcbcee7c1d
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 5 1
      InABox.Core/CoreUtils.cs
  2. 1 1
      inabox.wpf/Forms/MessageWindow.xaml.cs

+ 5 - 1
InABox.Core/CoreUtils.cs

@@ -1574,7 +1574,11 @@ namespace InABox.Core
                 return File.ReadAllText(curfile);
             
             return "???";
-            
+        }
+
+        public static string GetLogFile()
+        {
+            return Path.Combine(GetPath(), string.Format("{0:yyyy-MM-dd}.log", DateTime.Today));
         }
 
         public static string SplitCamelCase(this string value)

+ 1 - 1
inabox.wpf/Forms/MessageWindow.xaml.cs

@@ -326,7 +326,7 @@ public partial class MessageWindow : Window, INotifyPropertyChanged
 
     private static void EmailLogs_Click(Exception e)
     {
-        var logFile = Path.Combine(CoreUtils.GetPath(), string.Format("{0:yyyy-MM-dd}.log", DateTime.Today));
+        var logFile = CoreUtils.GetVersion();
 
         const int nRead = 1024 * 1024;