mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Added commands to delete logs and log files (separately)
This commit is contained in:
parent
e152ecc55d
commit
1274c1c144
12 changed files with 191 additions and 28 deletions
|
@ -1,4 +1,5 @@
|
|||
using NzbDrone.Common.Messaging;
|
||||
using System;
|
||||
using NzbDrone.Common.Messaging;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Instrumentation.Commands;
|
||||
|
||||
|
@ -9,7 +10,7 @@ namespace NzbDrone.Core.Instrumentation
|
|||
PagingSpec<Log> Paged(PagingSpec<Log> pagingSpec);
|
||||
}
|
||||
|
||||
public class LogService : ILogService, IExecute<TrimLogCommand>
|
||||
public class LogService : ILogService, IExecute<TrimLogCommand>, IExecute<ClearLogCommand>
|
||||
{
|
||||
private readonly ILogRepository _logRepository;
|
||||
|
||||
|
@ -27,5 +28,10 @@ namespace NzbDrone.Core.Instrumentation
|
|||
{
|
||||
_logRepository.Trim();
|
||||
}
|
||||
|
||||
public void Execute(ClearLogCommand message)
|
||||
{
|
||||
_logRepository.DeleteAll();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue