File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,8 @@ async Task Run(ClusterVNodeHostedService hostedService) {
216216
217217 var builder = WebApplication . CreateBuilder ( applicationOptions ) ;
218218 builder . Configuration . AddConfiguration ( configuration ) ;
219+ // AddWindowsService adds EventLog logging, which we remove afterwards.
220+ builder . Services . AddWindowsService ( ) ;
219221 builder . Logging . ClearProviders ( ) . AddSerilog ( ) ;
220222 builder . Services . Configure < KestrelServerOptions > ( configuration . GetSection ( "Kestrel" ) ) ;
221223 builder . Services . Configure < HostOptions > ( x => {
@@ -256,7 +258,6 @@ async Task Run(ClusterVNodeHostedService hostedService) {
256258 builder . Services . AddScoped < IdentityRedirectManager > ( ) ;
257259 builder . Services . AddSingleton ( monitoringService ) ;
258260 builder . Services . AddSingleton ( metricsObserver ) ;
259- builder . Services . AddWindowsService ( ) ;
260261 Log . Information ( "Environment Name: {0}" , builder . Environment . EnvironmentName ) ;
261262 Log . Information ( "ContentRoot Path: {0}" , builder . Environment . ContentRootPath ) ;
262263
You can’t perform that action at this time.
0 commit comments