Files
Umbraco-CMS/src/Umbraco.Core/Services/ILogViewerRepository.cs
Nikolaj Geisle e40f1839c4 V14: Refactor LogViewerService (#14511)
* Refactor GetPagedLogsAsync to not use ILogViewer

* Refactor GetPagedLogsAsync to not use ILogViewer

* Reorder using statements

* Introduce ILogViewerRepository

* Remove skip and take from repository

* Return IEnumerable instead of pagedModel

* Remove local GetLogs

* Return IEnumerable instead of pagedmodel

* Remove serilog entirely from ILogViewerService

* Move LogViewerService

* Inject LogViewerService as core service instead

* Implement LogViewerServiceTests.cs

* Add more happy path tests

* Add saved query tests

* Refactor private path fields  to normal variables in setup method

* Capitalize logs for Unix systems

* Added missing documentation

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Elitsa <elm@umbraco.dk>
2023-07-10 15:36:20 +03:00

33 lines
977 B
C#

using Umbraco.Cms.Core.Logging;
using Umbraco.Cms.Core.Logging.Viewer;
namespace Umbraco.Cms.Core.Services;
public interface ILogViewerRepository
{
/// <summary>
/// Returns the collection of log entries.
/// </summary>
IEnumerable<ILogEntry> GetLogs(LogTimePeriod logTimePeriod, string? filterExpression = null);
/// <summary>
/// Returns the number of the different log level entries.
/// </summary>
LogLevelCounts GetLogCount(LogTimePeriod logTimePeriod);
/// <summary>
/// Returns a list of all unique message templates and their counts.
/// </summary>
LogTemplate[] GetMessageTemplates(LogTimePeriod logTimePeriod);
/// <summary>
/// Gets the minimum-level log value from the config file.
/// </summary>
LogLevel GetGlobalMinLogLevel();
/// <summary>
/// Get the minimum-level log value from the config file.
/// </summary>
LogLevel RestrictedToMinimumLevel();
}