diff --git a/Cafe.Matcha/Views/MainControl.xaml.cs b/Cafe.Matcha/Views/MainControl.xaml.cs index 750c4a1..39c4546 100644 --- a/Cafe.Matcha/Views/MainControl.xaml.cs +++ b/Cafe.Matcha/Views/MainControl.xaml.cs @@ -277,7 +277,8 @@ private void Log(LogType type, char level, string message) } string typeString = Enum.GetName(typeof(LogType), type); - vm.Log = string.Format("[{0}][{1}][{2}] {3}\r\n", DateTime.Now, level, typeString, message) + vm.Log; + vm.Log = string.Format("[{0}][{1}][{2}] {3}\r\n", DateTime.Now, level, typeString, message) + + (vm.Log.Length > 10240 ? vm.Log.Substring(0, 10240) : vm.Log); ++vm.LogShowCount; }