logging: cleanse messages in log files (#14433)

Co-authored-by: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com>
This commit is contained in:
Bogdan
2023-06-08 18:09:16 +03:00
committed by GitHub
parent f42b76fb36
commit 23cff411ed
5 changed files with 118 additions and 20 deletions

View File

@@ -3,6 +3,7 @@ using System.IO;
using System.Text;
using Jackett.Common.Models.Config;
using Jackett.Common.Services;
using Jackett.Common.Utils.Logging;
using NLog;
using NLog.Config;
using NLog.LayoutRenderers;
@@ -21,7 +22,7 @@ namespace Jackett.Common.Utils
var logConfig = new LoggingConfiguration();
var logFile = new FileTarget
var logFile = new CleanseFileTarget
{
Layout = "${longdate} ${level} ${message} ${onexception:inner=${newline}${newline}[v${assembly-version}] ${exception:format=ToString}${newline}${exception:format=Data}${newline}}",
FileName = Path.Combine(settings.DataFolder, logFileName),