* 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>
33 lines
977 B
C#
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();
|
|
}
|