1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-10 13:02:47 +01:00
Radarr/NzbDrone.Core/Instrumentation/LogProvider.cs
2011-06-17 18:46:22 -07:00

30 lines
627 B
C#

using System.Collections.Generic;
using NLog;
using PetaPoco;
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");
}
}
}