Disable EventLog and EventSource (ETW) providers (#154)
This commit is contained in:
Родитель
af7707e642
Коммит
195e14b376
|
@ -96,14 +96,16 @@ namespace Microsoft.FactoryOrchestrator.Service
|
|||
});
|
||||
}
|
||||
})
|
||||
.ConfigureLogging(builder =>
|
||||
.ConfigureLogging(loggingBuilder =>
|
||||
{
|
||||
#if DEBUG
|
||||
var _logLevel = LogLevel.Information;
|
||||
var _logLevel = LogLevel.Information;
|
||||
#else
|
||||
var _logLevel = LogLevel.Critical;
|
||||
#endif
|
||||
builder.SetMinimumLevel(_logLevel).AddConsole().AddProvider(new LogFileProvider());
|
||||
#endif
|
||||
// Only log to console, debug, and the service log file
|
||||
loggingBuilder.ClearProviders()
|
||||
.SetMinimumLevel(_logLevel).AddConsole().AddDebug().AddProvider(new LogFileProvider());
|
||||
}).Build();
|
||||
|
||||
public static void Main(string[] args)
|
||||
|
@ -113,12 +115,16 @@ namespace Microsoft.FactoryOrchestrator.Service
|
|||
#else
|
||||
var _logLevel = LogLevel.Information;
|
||||
#endif
|
||||
var hostBuilder = Host.CreateDefaultBuilder(null).UseSystemd().ConfigureServices((hostContext, services) =>
|
||||
var hostBuilder = Host.CreateDefaultBuilder(null)
|
||||
.ConfigureLogging(loggingBuilder =>
|
||||
{
|
||||
// Only log to console, debug, and the service log file
|
||||
loggingBuilder.ClearProviders()
|
||||
.SetMinimumLevel(_logLevel).AddConsole().AddDebug().AddProvider(new LogFileProvider());
|
||||
})
|
||||
.UseSystemd().ConfigureServices((hostContext, services) =>
|
||||
{
|
||||
services.AddHostedService<Worker>();
|
||||
}).ConfigureLogging(builder =>
|
||||
{
|
||||
builder.SetMinimumLevel(_logLevel).AddConsole().AddProvider(new LogFileProvider());
|
||||
});
|
||||
|
||||
// Workaround for issue #140.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<!-- Assembly, App, Package version for all non-OSS files. Uses SemVer. -->
|
||||
<PropertyGroup Label="Version">
|
||||
<VersionPrefix>10.1.0</VersionPrefix>
|
||||
<VersionPrefix>10.1.1</VersionPrefix>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Common packaging properties -->
|
||||
|
|
Загрузка…
Ссылка в новой задаче