Skip to content

Commit d43b32b

Browse files
ramonsmitsmauroservienti
authored andcommitted
Also logging OnShutdown
1 parent b0fc786 commit d43b32b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ServiceControl.Hosting/WindowsServiceWithRequestTimeout.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,11 @@ protected override void OnStop()
3636

3737
base.OnStop();
3838
}
39+
40+
protected override void OnShutdown()
41+
{
42+
var logger = NLog.LogManager.GetCurrentClassLogger();
43+
logger.Info("OnShutdown invoked, process may exit ungracefully");
44+
base.OnShutdown();
45+
}
3946
}

0 commit comments

Comments
 (0)