From 5e5817b8a4d9ac4f73ebc3b0ae9c96074692e205 Mon Sep 17 00:00:00 2001 From: zxd Date: Sat, 11 Aug 2018 12:13:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E9=80=9A=E4=BF=A1=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=89=8D=E7=9A=84=E6=8F=90=E4=BA=A4=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=AF=BB=E5=8F=96=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plane.Logging/LocalFileLogger.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plane.Logging/LocalFileLogger.cs b/Plane.Logging/LocalFileLogger.cs index 0aae2c3..91b7ec6 100644 --- a/Plane.Logging/LocalFileLogger.cs +++ b/Plane.Logging/LocalFileLogger.cs @@ -46,7 +46,9 @@ namespace Plane.Logging public override string ReadLog() { - string text = File.ReadAllText(LogFilePath); + string text = ""; + if (File.Exists(LogFilePath)) + text = File.ReadAllText(LogFilePath); return text; }