File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 2222using Flow . Launcher . ViewModel ;
2323using Microsoft . Extensions . DependencyInjection ;
2424using Microsoft . Extensions . Hosting ;
25+ using Microsoft . Extensions . Logging ;
2526using Stopwatch = Flow . Launcher . Infrastructure . Stopwatch ;
2627
2728namespace Flow . Launcher
@@ -74,6 +75,12 @@ public App()
7475 WriteToLogFile ( $ "AppContext.BaseDirectory: { AppContext . BaseDirectory } ") ;
7576 _host = Host . CreateDefaultBuilder ( )
7677 . UseContentRoot ( AppContext . BaseDirectory )
78+ . ConfigureLogging ( logging =>
79+ {
80+ // Clear default logging providers
81+ // Fix issue EventLog access is not supported on this platform.
82+ logging . ClearProviders ( ) ;
83+ } )
7784 . ConfigureServices ( services => services
7885 . AddSingleton ( _ => _settings )
7986 . AddSingleton ( sp => new Updater ( sp . GetRequiredService < IPublicAPI > ( ) , Launcher . Properties . Settings . Default . GithubRepo ) )
You can’t perform that action at this time.
0 commit comments