Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
Merge branch 'hotfix-7.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonsmits committed Jul 25, 2017
2 parents 0174029 + 9ffe67b commit 934b0ac
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/NServiceBus.Hosting.Windows/WindowsHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ namespace NServiceBus.Hosting.Windows
/// </summary>
public class WindowsHost : MarshalByRefObject
{
ILog Log = LogManager.GetLogger<WindowsHost>();
GenericHost genericHost;

/// <summary>
Expand All @@ -32,9 +31,10 @@ public void Start()
{
genericHost.Start().GetAwaiter().GetResult();
}
catch (Exception ex)
catch (Exception exception)
{
Log.Fatal("Start failure", ex);
var log = LogManager.GetLogger<WindowsHost>(); // Defers logger creation to allow custom logging configuration
log.Fatal("Start failure", exception);
Environment.Exit(-1);
}
}
Expand All @@ -48,11 +48,12 @@ public void Stop()
{
genericHost.Stop().GetAwaiter().GetResult();
}
catch (Exception ex)
catch (Exception exception)
{
Log.Fatal("Stop failure", ex);
var log = LogManager.GetLogger<WindowsHost>(); // Defers logger creation to allow custom logging configuration
log.Fatal("Stop failure", exception);
Environment.Exit(-2);
}
}
}
}
}

0 comments on commit 934b0ac

Please sign in to comment.