Interface ILogViewerService
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public interface ILogViewerService : IService
Methods
View SourceAddSavedLogQueryAsync(String, String)
Adds a new saved log query to your chosen data source.
Declaration
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 | query | The query of the new saved log query. |
Returns
Type | Description |
---|---|
Task<Attempt<ILogViewerQuery, LogViewerOperationStatus>> |
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).
Declaration
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> | endDate | The end date for the date range. |
Returns
Type | Description |
---|---|
Task<Attempt<System.Boolean, LogViewerOperationStatus>> | The value whether or not you are able to view the logs. |
DeleteSavedLogQueryAsync(String)
Deletes a saved log query to your chosen data source.
Declaration
Task<Attempt<ILogViewerQuery, LogViewerOperationStatus>> DeleteSavedLogQueryAsync(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the saved log search. |
Returns
Type | Description |
---|---|
Task<Attempt<ILogViewerQuery, LogViewerOperationStatus>> |
GetGlobalMinLogLevel()
Get the minimum log level value from the config file.
Declaration
LogLevel GetGlobalMinLogLevel()
Returns
Type | Description |
---|---|
LogLevel |
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).
Declaration
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> | endDate | The end date for the date range. |
Returns
Type | Description |
---|---|
Task<Attempt<LogLevelCounts, LogViewerOperationStatus>> |
GetLogLevelsFromSinks()
Get the log level values of the global minimum and the UmbracoFile one from the config file.
Declaration
ReadOnlyDictionary<string, LogLevel> GetLogLevelsFromSinks()
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyDictionary<System.String, LogLevel> |
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).
Declaration
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> | endDate | The end date for the date range. |
System.Int32 | skip | The amount of items to skip. |
System.Int32 | take | The amount of items to take. |
Returns
Type | Description |
---|---|
Task<Attempt<PagedModel<LogTemplate>, LogViewerOperationStatus>> |
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).
Declaration
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> | endDate | The end date for the date range. |
System.Int32 | skip | The amount of items to skip. |
System.Int32 | take | The amount of items to take. |
Direction | orderDirection | The direction in which the log entries are to be ordered. |
System.String | filterExpression | The query expression to filter on. |
System.String[] | logLevels | The log levels for which to retrieve the log messages. |
Returns
Type | Description |
---|---|
Task<Attempt<PagedModel<ILogEntry>, LogViewerOperationStatus>> |
GetSavedLogQueriesAsync(Int32, Int32)
Get all saved log queries from your chosen data source as a paged model.
Declaration
Task<PagedModel<ILogViewerQuery>> GetSavedLogQueriesAsync(int skip, int take)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | skip | The amount of items to skip. |
System.Int32 | take | The amount of items to take. |
Returns
Type | Description |
---|---|
Task<PagedModel<ILogViewerQuery>> |
GetSavedLogQueryByNameAsync(String)
Gets a saved log query by name from your chosen data source.
Declaration
Task<ILogViewerQuery> GetSavedLogQueryByNameAsync(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the saved log query. |
Returns
Type | Description |
---|---|
Task<ILogViewerQuery> |