mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
fixed a bunch of things. added basic support for file scanning. logs are now avilable in the UI
This commit is contained in:
parent
c8a8fb4d62
commit
fa0af257ff
48 changed files with 914 additions and 208 deletions
32
NzbDrone.Core/Instrumentation/NlogWriter.cs
Normal file
32
NzbDrone.Core/Instrumentation/NlogWriter.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using System.IO;
|
||||
using System.Text;
|
||||
using NLog;
|
||||
|
||||
namespace NzbDrone.Core.Instrumentation
|
||||
{
|
||||
public class NlogWriter : TextWriter
|
||||
{
|
||||
private static readonly Logger Logger = LogManager.GetLogger("DB");
|
||||
|
||||
|
||||
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; }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue