You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/NzbDrone.Core/Instrumentation/LogProvider.cs

32 lines
673 B

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");
}
}
}