Class LogViewerConfig
Represents the configuration settings used by the Log Viewer in Umbraco.
Inheritance
Namespace: Umbraco.Cms.Core.Logging.Viewer
Assembly: Umbraco.Infrastructure.dll
Syntax
public class LogViewerConfig : ILogViewerConfig
Constructors
View SourceLogViewerConfig(ILogViewerQueryRepository, IScopeProvider)
Initializes a new instance of the LogViewerConfig class.
Declaration
public LogViewerConfig(ILogViewerQueryRepository logViewerQueryRepository, IScopeProvider scopeProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| ILogViewerQueryRepository | logViewerQueryRepository | An instance used to query log data for the log viewer. |
| IScopeProvider | scopeProvider | The provider that manages database transaction scopes. |
Methods
View SourceAddSavedSearch(string, string)
Adds a saved search with the specified name and query.
Declaration
[Obsolete("Use ILogViewerService.AddSavedLogQueryAsync instead. Scheduled for removal in Umbraco 15.")]
public IReadOnlyList<SavedLogSearch> AddSavedSearch(string name, string query)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the saved search. |
| string | query | The query string for the saved search. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<SavedLogSearch> | A read-only list of all saved log searches. |
Remarks
This method is obsolete. Use ILogViewerService.AddSavedLogQueryAsync instead. Scheduled for removal in Umbraco 15.
DeleteSavedSearch(string)
Deletes a saved log search with the specified name and returns the updated list of saved log searches.
Declaration
[Obsolete("Use ILogViewerService.DeleteSavedLogQueryAsync instead. Scheduled for removal in Umbraco 15.")]
public IReadOnlyList<SavedLogSearch> DeleteSavedSearch(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the saved search to delete. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<SavedLogSearch> | A read-only list containing the remaining saved log searches after the specified search has been deleted. |
Remarks
This method is obsolete. Use ILogViewerService.DeleteSavedLogQueryAsync instead. Scheduled for removal in Umbraco 15. If no saved search with the specified name exists, the method returns the current list of saved searches unchanged.
GetSavedSearches()
Gets the saved log searches.
Declaration
[Obsolete("Use ILogViewerService.GetSavedLogQueriesAsync instead. Scheduled for removal in Umbraco 15.")]
public IReadOnlyList<SavedLogSearch> GetSavedSearches()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<SavedLogSearch> | A read-only list of saved log searches. |
Remarks
This method is obsolete. Use ILogViewerService.GetSavedLogQueriesAsync instead.