View Source
Class SerilogLogViewerSourceBase
Assembly: Umbraco.Infrastructure.dll
Syntax
[Obsolete("Use ILogViewerService instead. Scheduled removal in Umbraco 18.")]
public abstract class SerilogLogViewerSourceBase : ILogViewer
Constructors
View Source
SerilogLogViewerSourceBase(ILogViewerConfig, ILogLevelLoader, ILogger)
Declaration
protected SerilogLogViewerSourceBase(ILogViewerConfig logViewerConfig, ILogLevelLoader logLevelLoader, ILogger serilogLog)
Parameters
Properties
View Source
CanHandleLargeLogs
Declaration
public abstract bool CanHandleLargeLogs { get; }
Property Value
Methods
View Source
AddSavedSearch(string, string)
Adds a new saved search to chosen data source and returns the updated searches
Declaration
[Obsolete("Use ILogViewerService.AddSavedLogQueryAsync instead. Scheduled for removal in Umbraco 15.")]
public virtual IReadOnlyList<SavedLogSearch> AddSavedSearch(string name, string query)
Parameters
| Type |
Name |
Description |
| string |
name |
|
| string |
query |
|
Returns
View Source
CheckCanOpenLogs(LogTimePeriod)
Declaration
[Obsolete("Use ILogViewerService.CanViewLogsAsync instead. Scheduled for removal in Umbraco 15.")]
public abstract bool CheckCanOpenLogs(LogTimePeriod logTimePeriod)
Parameters
Returns
View Source
DeleteSavedSearch(string)
Deletes a saved search to chosen data source and returns the remaining searches
Declaration
[Obsolete("Use ILogViewerService.DeleteSavedLogQueryAsync instead. Scheduled for removal in Umbraco 15.")]
public virtual IReadOnlyList<SavedLogSearch> DeleteSavedSearch(string name)
Parameters
| Type |
Name |
Description |
| string |
name |
|
Returns
View Source
GetLogLevelCounts(LogTimePeriod)
Returns a number of the different log level entries
Declaration
[Obsolete("Use ILogViewerService.GetLogLevelCounts instead. Scheduled for removal in Umbraco 15.")]
public LogLevelCounts GetLogLevelCounts(LogTimePeriod logTimePeriod)
Parameters
Returns
View Source
GetLogLevels()
Get the Serilog minimum-level and UmbracoFile-level values from the config file.
Declaration
[Obsolete("Use ILogViewerService.GetLogLevelsFromSinks instead. Scheduled for removal in Umbraco 15.")]
public ReadOnlyDictionary<string, LogEventLevel?> GetLogLevels()
Returns
| Type |
Description |
| ReadOnlyDictionary<string, LogEventLevel?> |
|
View Source
GetLogs(LogTimePeriod, int, int, Direction, string?, string[]?)
Returns the collection of logs
Declaration
[Obsolete("Use ILogViewerService.GetPagedLogs instead. Scheduled for removal in Umbraco 15.")]
public PagedResult<LogMessage> GetLogs(LogTimePeriod logTimePeriod, int pageNumber = 1, int pageSize = 100, Direction orderDirection = Direction.Descending, string? filterExpression = null, string[]? logLevels = null)
Parameters
| Type |
Name |
Description |
| LogTimePeriod |
logTimePeriod |
|
| int |
pageNumber |
|
| int |
pageSize |
|
| Direction |
orderDirection |
|
| string |
filterExpression |
|
| string[] |
logLevels |
|
Returns
View Source
GetLogs(LogTimePeriod, ILogFilter, int, int)
Get all logs from your chosen data source back as Serilog LogEvents
Declaration
protected abstract IReadOnlyList<LogEvent> GetLogs(LogTimePeriod logTimePeriod, ILogFilter filter, int skip, int take)
Parameters
Returns
| Type |
Description |
| IReadOnlyList<LogEvent> |
|
View Source
GetLogsAsPagedModel(LogTimePeriod, int, int, Direction, string?, string[]?)
Declaration
[Obsolete("Use ILogViewerService.GetPagedLogs instead. Scheduled for removal in Umbraco 15.")]
public PagedModel<LogMessage> GetLogsAsPagedModel(LogTimePeriod logTimePeriod, int skip, int take, Direction orderDirection = Direction.Descending, string? filterExpression = null, string[]? logLevels = null)
Parameters
| Type |
Name |
Description |
| LogTimePeriod |
logTimePeriod |
|
| int |
skip |
|
| int |
take |
|
| Direction |
orderDirection |
|
| string |
filterExpression |
|
| string[] |
logLevels |
|
Returns
View Source
GetMessageTemplates(LogTimePeriod)
Returns a list of all unique message templates and their counts
Declaration
[Obsolete("Use ILogViewerService.GetMessageTemplates instead. Scheduled for removal in Umbraco 15.")]
public IEnumerable<LogTemplate> GetMessageTemplates(LogTimePeriod logTimePeriod)
Parameters
Returns
View Source
GetNumberOfErrors(LogTimePeriod)
A count of number of errors
By counting Warnings with Exceptions, Errors & Fatal messages
Declaration
public int GetNumberOfErrors(LogTimePeriod logTimePeriod)
Parameters
Returns
View Source
GetSavedSearches()
Get all saved searches from your chosen data source
Declaration
[Obsolete("Use ILogViewerService.GetSavedLogQueriesAsync instead. Scheduled for removal in Umbraco 15.")]
public virtual IReadOnlyList<SavedLogSearch> GetSavedSearches()
Returns