mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-26 09:37:12 +00:00
32 lines
No EOL
719 B
C#
32 lines
No EOL
719 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 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`.", ""));
|
|
}
|
|
}
|
|
} |