mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 17:59:14 +00:00
32 lines
No EOL
673 B
C#
32 lines
No EOL
673 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using NLog;
|
|
using PetaPoco;
|
|
using SubSonic.Repository;
|
|
|
|
namespace NzbDrone.Core.Instrumentation
|
|
{
|
|
public class LogProvider
|
|
{
|
|
private readonly IDatabase _database;
|
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
|
|
|
|
|
|
|
public LogProvider(IDatabase database)
|
|
{
|
|
_database = database;
|
|
}
|
|
|
|
public IList<Log> GetAllLogs()
|
|
{
|
|
return _database.Fetch<Log>();
|
|
}
|
|
|
|
public void DeleteAll()
|
|
{
|
|
_database.Delete<Log>("");
|
|
Logger.Info("Cleared Log History");
|
|
}
|
|
}
|
|
} |