From c46a37714fb8168930b2561f0a7e74d5508ad083 Mon Sep 17 00:00:00 2001 From: John Gietzen Date: Sat, 12 May 2018 19:42:43 -0700 Subject: [PATCH] Fix logging so that error details are output to console. --- src/GitReleaseNotes/Program.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/GitReleaseNotes/Program.cs b/src/GitReleaseNotes/Program.cs index 23d2437..c53a2ee 100644 --- a/src/GitReleaseNotes/Program.cs +++ b/src/GitReleaseNotes/Program.cs @@ -13,7 +13,10 @@ namespace GitReleaseNotes public static class Program { // TODO Fix logging.. Just choose serilog or something which liblog picks up - private static readonly ILog Log = GitReleaseNotesEnvironment.Log; + private static ILog Log + { + get { return GitReleaseNotesEnvironment.Log; } + } public static int Main(string[] args) { @@ -83,7 +86,7 @@ public static int Main(string[] args) catch (Exception ex) { exitCode = -2; - Log.WriteLine("An unexpected error occurred: {0}", ex.Message); + Log.WriteLine("An unexpected error occurred: {0}", ex.GetBaseException().Message); } if (Debugger.IsAttached)