public class EnvironmentNameLogEntryLabelProvider : ILogEntryLabelProvider, ILogEntryLabelProviderA ILogEntryLabelProvider implementation which adds the Microsoft.AspNetCore.Hosting.IHostingEnvironment.EnvironmentName to the log entry labels.
Inheritance
System.Object > EnvironmentNameLogEntryLabelProviderNamespace
Google.Cloud.Diagnostics.AspNetCoreAssembly
Google.Cloud.Diagnostics.AspNetCore.dll
Constructors
EnvironmentNameLogEntryLabelProvider(IHostingEnvironment)
public EnvironmentNameLogEntryLabelProvider(IHostingEnvironment hostingEnvironment)Initializes a new instance of the EnvironmentNameLogEntryLabelProvider class.
| Parameter | |
|---|---|
| Name | Description |
hostingEnvironment |
Microsoft.AspNetCore.Hosting.IHostingEnvironmentThe Microsoft.AspNetCore.Hosting.IHostingEnvironment 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 |
System.Collections.Generic.Dictionary<System.String, System.String>A dictionary of log entry labels.
Keys and values added to |