mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
manage Microsoft logs by NLog (#4080)
* now Microsoft log (Microsoft.*) are correctly supported by Nlog
* Microsoft log are now not logged under level info if tracing is not enabled.
* remove unused prefix NLog.
* Revert "Microsoft log are now not logged under level info if tracing is not enabled."
This reverts commit 00e94204e0
.
* microsoft logs in console are preserved.
Only service log is clean of microsoft logs when tracing is not enabled.
* change loglevel min to debug
* Microsoft logs can be reactivate when Enhanced logging is set to true.
* adjust min & max level of serviceMicrosoftRule
* clean Microsoft logs in all NLog targets
This commit is contained in:
@@ -7,6 +7,7 @@ using Jackett.Common.Utils;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NLog;
|
||||
using NLog.Web;
|
||||
using System;
|
||||
@@ -184,6 +185,11 @@ namespace Jackett.Server
|
||||
.PreferHostingUrls(true)
|
||||
.UseConfiguration(Configuration)
|
||||
.UseStartup<Startup>()
|
||||
.ConfigureLogging(logging =>
|
||||
{
|
||||
logging.ClearProviders();
|
||||
logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
|
||||
})
|
||||
.UseNLog();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user