1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/NzbDrone.Core/Instrumentation/LogService.cs

37 lines
794 B
C#
Raw Normal View History

2013-02-23 22:38:25 +03:00
using System.Linq;
2013-06-05 03:49:53 +03:00
using NzbDrone.Core.Datastore;
2013-02-23 22:38:25 +03:00
namespace NzbDrone.Core.Instrumentation
{
public interface ILogService
{
void DeleteAll();
void Trim();
2013-06-05 03:49:53 +03:00
PagingSpec<Log> Paged(PagingSpec<Log> pagingSpec);
2013-02-23 22:38:25 +03:00
}
public class LogService : ILogService
{
private readonly ILogRepository _logRepository;
2013-03-05 22:58:53 +03:00
public LogService(ILogRepository logRepository)
2013-02-23 22:38:25 +03:00
{
_logRepository = logRepository;
}
public void DeleteAll()
{
_logRepository.Purge();
}
public void Trim()
{
_logRepository.Trim();
}
2013-06-05 03:49:53 +03:00
public PagingSpec<Log> Paged(PagingSpec<Log> pagingSpec)
{
return _logRepository.GetPaged(pagingSpec);
}
2013-02-23 22:38:25 +03:00
}
}