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)