Google.Cloud.Diagnostics.AspNetCore3 - Class EnvironmentNameLogEntryLabelProvider (5.1.0)

public class EnvironmentNameLogEntryLabelProvider : ILogEntryLabelProvider

Reference documentation and code samples for the Google.Cloud.Diagnostics.AspNetCore3 class EnvironmentNameLogEntryLabelProvider.

A ILogEntryLabelProvider implementation which adds the EnvironmentName to the log entry labels.

Inheritance

object > EnvironmentNameLogEntryLabelProvider

Namespace

GoogleCloudGoogle.Cloud.DiagnosticsAspNetCore3

Assembly

Google.Cloud.Diagnostics.AspNetCore3.dll

Constructors

EnvironmentNameLogEntryLabelProvider(IWebHostEnvironment)

public EnvironmentNameLogEntryLabelProvider(IWebHostEnvironment hostingEnvironment)

Initializes a new instance of the EnvironmentNameLogEntryLabelProvider class.

Parameter
NameDescription
hostingEnvironmentIWebHostEnvironment

The IWebHostEnvironment instance to retrieve the environment name from.

Methods

Invoke(Dictionary<string, string>)

public void Invoke(Dictionary<string, string> labels)
Parameter
NameDescription
labelsDictionarystringstring