public class EnvironmentNameLogEntryLabelProvider : ILogEntryLabelProvider
Reference documentation and code samples for the Google.Cloud.Diagnostics.AspNetCore3 class EnvironmentNameLogEntryLabelProvider.
A Google.Cloud.Diagnostics.Common.ILogEntryLabelProvider implementation which adds the EnvironmentName to the log entry labels.
Implements
Google.Cloud.Diagnostics.Common.ILogEntryLabelProviderNamespace
Google.Cloud.Diagnostics.AspNetCore3Assembly
Google.Cloud.Diagnostics.AspNetCore3.dll
Constructors
EnvironmentNameLogEntryLabelProvider(IWebHostEnvironment)
public EnvironmentNameLogEntryLabelProvider(IWebHostEnvironment hostingEnvironment)
Initializes a new instance of the EnvironmentNameLogEntryLabelProvider class.
Parameter | |
---|---|
Name | Description |
hostingEnvironment |
IWebHostEnvironment The IWebHostEnvironment instance to retrieve the environment name from. |
Methods
Invoke(Dictionary<string, string>)
public void Invoke(Dictionary<string, string> labels)
Invokes the provider to augment log entry labels.
Parameter | |
---|---|
Name | Description |
labels |
Dictionarystringstring A dictionary of log entry labels.
Keys and values added to |