1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-30 11:46:09 +00:00
Sonarr/NzbDrone.Host/Owin/NlogTextWriter.cs
2013-09-11 17:42:53 -07:00

40 lines
No EOL
834 B
C#

using System.IO;
using System.Text;
using NLog;
using NzbDrone.Common.Instrumentation;
namespace NzbDrone.Host.Owin
{
public class NlogTextWriter : TextWriter
{
private readonly Logger _logger = NzbDroneLogger.GetLogger();
public override Encoding Encoding
{
get
{
return Encoding.Default;
}
}
public override void Write(char[] buffer, int index, int count)
{
Write(buffer);
}
public override void Write(char[] buffer)
{
Write(new string(buffer));
}
public override void Write(string value)
{
_logger.Trace(value);
}
public override void Write(char value)
{
_logger.Trace(value);
}
}
}