1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-19 16:01:46 +02:00
Radarr/NzbDrone.Core/Instrumentation/LogService.cs
2013-06-18 18:01:08 -07:00

31 lines
769 B
C#

using NzbDrone.Common.Messaging;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Instrumentation.Commands;
namespace NzbDrone.Core.Instrumentation
{
public interface ILogService
{
PagingSpec<Log> Paged(PagingSpec<Log> pagingSpec);
}
public class LogService : ILogService, IExecute<TrimLogCommand>
{
private readonly ILogRepository _logRepository;
public LogService(ILogRepository logRepository)
{
_logRepository = logRepository;
}
public PagingSpec<Log> Paged(PagingSpec<Log> pagingSpec)
{
return _logRepository.GetPaged(pagingSpec);
}
public void Execute(TrimLogCommand message)
{
_logRepository.Trim();
}
}
}