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/LogProvider.cs
Normal file
32
NzbDrone.Core/Instrumentation/LogProvider.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using NLog;
|
||||
using SubSonic.Repository;
|
||||
|
||||
namespace NzbDrone.Core.Instrumentation
|
||||
{
|
||||
|
||||
public class LogProvider : ILogProvider
|
||||
{
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
private readonly IRepository _repository;
|
||||
|
||||
public LogProvider(IRepository repository)
|
||||
{
|
||||
_repository = repository;
|
||||
}
|
||||
|
||||
public IQueryable<Log> GetAllLogs()
|
||||
{
|
||||
return _repository.All<Log>();
|
||||
}
|
||||
|
||||
public void DeleteAll()
|
||||
{
|
||||
_repository.DeleteMany(GetAllLogs());
|
||||
Logger.Info("Cleared Log History");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue