Tidy up logging renderer

This commit is contained in:
flightlevel
2018-07-02 21:03:03 +10:00
parent 947bed0a46
commit 1e67996df0
2 changed files with 14 additions and 11 deletions

View File

@@ -1,8 +1,12 @@
using Jackett.Common.Models.Config;
using Jackett.Common.Services;
using NLog;
using NLog.Config;
using NLog.LayoutRenderers;
using NLog.Targets;
using System;
using System.IO;
using System.Text;
namespace Jackett.Common.Utils
{
@@ -45,5 +49,14 @@ namespace Jackett.Common.Utils
return logConfig;
}
[LayoutRenderer("simpledatetime")]
public class SimpleDateTimeRenderer : LayoutRenderer
{
protected override void Append(StringBuilder builder, LogEventInfo logEvent)
{
builder.Append(DateTime.Now.ToString("MM-dd HH:mm:ss"));
}
}
}
}