1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00
Radarr/NzbDrone.Core/Instrumentation/NlogWriter.cs
2011-03-28 17:12:48 -07:00

32 lines
698 B
C#

using System.IO;
using System.Text;
using NLog;
namespace NzbDrone.Core.Instrumentation
{
public class NlogWriter : TextWriter
{
private static readonly Logger Logger = LogManager.GetLogger("NzbDrone.SubSonic");
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);
}
public override Encoding Encoding
{
get { return Encoding.Default; }
}
}
}