Class LogService
Provides logging services.
Inheritance
object
LogService
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DataWeb.Logging
Assembly: DataWeb.Core.dll
Syntax
public class LogService : ILogService
Constructors
LogService(IHttpService, IConfigurationService, ILogEventStore)
Initializes a new instance of the LogService class with the specified dependencies.
Declaration
public LogService(IHttpService httpService, IConfigurationService configurationService, ILogEventStore logEventStore)
Parameters
Type | Name | Description |
---|---|---|
IHttpService | httpService | The IHttpService used to retrieve information about the request. |
IConfigurationService | configurationService | The IConfigurationService used to retrieve application settings. |
ILogEventStore | logEventStore | The ILogEventStore used to store log events. |
Methods
GetLogEventsAsync(LogEventFilter)
Asynchronously retrieves log events that match the specified filter.
Declaration
public Task<IEnumerable<LogEvent>> GetLogEventsAsync(LogEventFilter filter)
Parameters
Type | Name | Description |
---|---|---|
LogEventFilter | filter | The LogEventFilter used to retrieve the log events. |
Returns
Type | Description |
---|---|
Task<IEnumerable<LogEvent>> | A task that represents the asynchronous operation. The task result contains the log events. |
SetLogEventAsync(LogEvent)
Asynchronously adds a log event to the store.
Declaration
public Task SetLogEventAsync(LogEvent logEvent)
Parameters
Type | Name | Description |
---|---|---|
LogEvent | logEvent | The LogEvent to add to the store. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |