public class UserLogEntryLabelProvider : HttpLogEntryLabelProvider, ILogEntryLabelProvider, ILogEntryLabelProviderA ILogEntryLabelProvider which adds the information of the authenticated user to the log entry labels.
Namespace
Google.Cloud.Diagnostics.AspNetCoreAssembly
Google.Cloud.Diagnostics.AspNetCore.dll
Constructors
UserLogEntryLabelProvider(IHttpContextAccessor)
public UserLogEntryLabelProvider(IHttpContextAccessor httpContextAccessor)Initializes a new instance of the UserLogEntryLabelProvider class.
| Parameter | |
|---|---|
| Name | Description |
httpContextAccessor |
IHttpContextAccessorThe IHttpContextAccessor instance with the HttpContext. |
Methods
InvokeCore(Dictionary<String, String>, HttpContext)
protected override void InvokeCore(Dictionary<string, string> labels, HttpContext httpContext)In a derived class, invokes the core logic of the ILogEntryLabelProvider using the HttpContext instance.
| Parameters | |
|---|---|
| Name | Description |
labels |
Dictionary<String, String>The log entry labels to augment. |
httpContext |
HttpContextThe HttpContext instance. |