mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 21:12:43 +02:00
Added commands to delete logs and log files (separately)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user