Class EnvironmentNameLogEntryLabelProvider (5.0.0)

public class EnvironmentNameLogEntryLabelProvider : ILogEntryLabelProvider

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

Inheritance

Object > EnvironmentNameLogEntryLabelProvider

Namespace

Google.Cloud.Diagnostics.AspNetCore3

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
labelsDictionary<String, String>