1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-14 06:52:36 +01:00
Radarr/NzbDrone.Core/Instrumentation/NlogWriter.cs

32 lines
719 B
C#
Raw Normal View History

using System.IO;
using System.Text;
using NLog;
namespace NzbDrone.Core.Instrumentation
{
public class NlogWriter : TextWriter
{
2011-03-29 02:12:48 +02:00
private static readonly Logger Logger = LogManager.GetLogger("NzbDrone.SubSonic");
2011-04-10 04:44:01 +02:00
public override Encoding Encoding
{
get { return Encoding.Default; }
}
public override void Write(char[] buffer, int index, int count)
{
Write(new string(buffer, index, count));
}
public override void Write(string value)
{
DbAction(value);
}
private static void DbAction(string value)
{
Logger.Trace(value.Replace("`t0`.", ""));
}
}
}