Class UserLogEntryLabelProvider (4.4.0)

public class UserLogEntryLabelProvider : HttpLogEntryLabelProvider, ILogEntryLabelProvider, ILogEntryLabelProvider

A ILogEntryLabelProvider which adds the information of the authenticated user to the log entry labels.

Inheritance

System.Object > HttpLogEntryLabelProvider > UserLogEntryLabelProvider

Namespace

Google.Cloud.Diagnostics.AspNetCore

Assembly

Google.Cloud.Diagnostics.AspNetCore.dll

Constructors

UserLogEntryLabelProvider(IHttpContextAccessor)

public UserLogEntryLabelProvider(IHttpContextAccessor httpContextAccessor)

Initializes a new instance of the UserLogEntryLabelProvider class.

Parameter
Name Description
httpContextAccessor Microsoft.AspNetCore.Http.IHttpContextAccessor

The Microsoft.AspNetCore.Http.IHttpContextAccessor instance with the Microsoft.AspNetCore.Http.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 Microsoft.AspNetCore.Http.HttpContext instance.

Parameters
Name Description
labels System.Collections.Generic.Dictionary<System.String, System.String>

The log entry labels to augment.

httpContext Microsoft.AspNetCore.Http.HttpContext

The Microsoft.AspNetCore.Http.HttpContext instance.

Overrides