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:
aurelien
2018-11-14 17:52:56 +01:00
committed by kaso17
parent a2eb4dbdbd
commit 6c1dcd1a7d
3 changed files with 64 additions and 2 deletions

View File

@@ -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();
}
}