System.Object
Namespace: Umbraco.Cms.Core.Services Assembly: Umbraco.Core.dll Syntaxpublic class LogViewerService : ILogViewerService, IService
Constructors View Source LogViewerService(ILogViewerQueryRepository, ICoreScopeProvider, ILoggingConfiguration, ILogViewerRepository) Declaration
public LogViewerService(ILogViewerQueryRepository logViewerQueryRepository, ICoreScopeProvider provider, ILoggingConfiguration loggingConfiguration, ILogViewerRepository logViewerRepository)
Parameters Methods View Source AddSavedLogQueryAsync(String, String)
Adds a new saved log query to your chosen data source.
Declarationpublic async Task<Attempt<ILogViewerQuery, LogViewerOperationStatus>> AddSavedLogQueryAsync(string name, string query)
Parameters Type Name Description System.String name
The name of the new saved log query.
System.String queryThe query of the new saved log query.
Returns View Source CanViewLogsAsync(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)Returns a value indicating whether the log files for the given time period are not too large to view (more than 1GB).
Declarationpublic async Task<Attempt<bool, LogViewerOperationStatus>> CanViewLogsAsync(DateTimeOffset? startDate, DateTimeOffset? endDate)
Parameters Type Name Description System.Nullable<DateTimeOffset> startDate
The start date for the date range.
System.Nullable<DateTimeOffset> endDateThe end date for the date range.
Returns View Source DeleteSavedLogQueryAsync(String)Deletes a saved log query to your chosen data source.
Declarationpublic async Task<Attempt<ILogViewerQuery, LogViewerOperationStatus>> DeleteSavedLogQueryAsync(string name)
Parameters Type Name Description System.String name
The name of the saved log search.
Returns View Source GetGlobalMinLogLevel()Get the minimum log level value from the config file.
Declarationpublic LogLevel GetGlobalMinLogLevel()
Returns View Source GetLogLevelCountsAsync(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)
Returns a number of the different log level entries. The attempt will fail if the log files for the given time period are too large (more than 1GB).
Declarationpublic async Task<Attempt<LogLevelCounts, LogViewerOperationStatus>> GetLogLevelCountsAsync(DateTimeOffset? startDate, DateTimeOffset? endDate)
Parameters Type Name Description System.Nullable<DateTimeOffset> startDate
The start date for the date range.
System.Nullable<DateTimeOffset> endDateThe end date for the date range.
Returns View Source GetLogLevelsFromSinks()Get the log level values of the global minimum and the UmbracoFile one from the config file.
Declarationpublic ReadOnlyDictionary<string, LogLevel> GetLogLevelsFromSinks()
Returns Type Description System.Collections.ObjectModel.ReadOnlyDictionary<System.String, LogLevel> View Source GetMessageTemplatesAsync(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, Int32, Int32)
Returns a paged model of all unique message templates and their counts. The attempt will fail if the log files for the given time period are too large (more than 1GB).
Declarationpublic async Task<Attempt<PagedModel<LogTemplate>, LogViewerOperationStatus>> GetMessageTemplatesAsync(DateTimeOffset? startDate, DateTimeOffset? endDate, int skip, int take)
Parameters Type Name Description System.Nullable<DateTimeOffset> startDate
The start date for the date range.
System.Nullable<DateTimeOffset> endDateThe end date for the date range.
System.Int32 skipThe amount of items to skip.
System.Int32 takeThe amount of items to take.
Returns View Source GetPagedLogsAsync(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, Int32, Int32, Direction, String, String[])Gets all logs as a paged model. The attempt will fail if the log files for the given time period are too large (more than 1GB).
Declarationpublic async Task<Attempt<PagedModel<ILogEntry>, LogViewerOperationStatus>> GetPagedLogsAsync(DateTimeOffset? startDate, DateTimeOffset? endDate, int skip, int take, Direction orderDirection = Direction.Descending, string filterExpression = null, string[] logLevels = null)
Parameters Type Name Description System.Nullable<DateTimeOffset> startDate
The start date for the date range.
System.Nullable<DateTimeOffset> endDateThe end date for the date range.
System.Int32 skipThe amount of items to skip.
System.Int32 takeThe amount of items to take.
Direction orderDirectionThe direction in which the log entries are to be ordered.
System.String filterExpressionThe query expression to filter on.
System.String[] logLevelsThe log levels for which to retrieve the log messages.
Returns View Source GetSavedLogQueriesAsync(Int32, Int32)Get all saved log queries from your chosen data source as a paged model.
Declarationpublic async Task<PagedModel<ILogViewerQuery>> GetSavedLogQueriesAsync(int skip, int take)
Parameters Type Name Description System.Int32 skip
The amount of items to skip.
System.Int32 takeThe amount of items to take.
Returns View Source GetSavedLogQueryByNameAsync(String)Gets a saved log query by name from your chosen data source.
Declarationpublic async Task<ILogViewerQuery> GetSavedLogQueryByNameAsync(string name)
Parameters Type Name Description System.String name
The name of the saved log query.
ReturnsRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4