mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-28 10:37:41 +00:00
42 lines
No EOL
836 B
C#
42 lines
No EOL
836 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 value)
|
|
{
|
|
logger.Trace(value);
|
|
}
|
|
|
|
public override void Write(char[] buffer)
|
|
{
|
|
logger.Trace(buffer);
|
|
}
|
|
|
|
public override void Write(string value)
|
|
{
|
|
logger.Trace(value);
|
|
}
|
|
|
|
public override void Write(char[] buffer, int index, int count)
|
|
{
|
|
logger.Trace(buffer);
|
|
}
|
|
|
|
}
|
|
} |