Better error log

This commit is contained in:
bao-qian
2015-11-11 00:42:49 +00:00
parent 11aed2ab61
commit 5e4cfbaf3f

View File

@@ -1,4 +1,5 @@
using NLog;
using System.Diagnostics;
using NLog;
using Wox.Infrastructure.Exception;
namespace Wox.Infrastructure.Logger
@@ -12,7 +13,12 @@ namespace Wox.Infrastructure.Logger
#if DEBUG
throw e;
#else
logger.Error(e.Message + "\r\n" + e.StackTrace);
while (e.InnerException != null)
{
logger.Error(e.Message);
logger.Error(e.StackTrace);
e = e.InnerException;
}
#endif
}