public sealed class GoogleLoggerProvider : ILoggerProvider, IDisposable
ILoggerProvider for Google Cloud Logging.
Namespace
Google.Cloud.Diagnostics.CommonAssembly
Google.Cloud.Diagnostics.Common.dll
Methods
Create(IServiceProvider, LoggingServiceOptions)
public static GoogleLoggerProvider Create(IServiceProvider serviceProvider, LoggingServiceOptions options = null)
Create an ILoggerProvider for Google Cloud Logging.
Parameters | |
---|---|
Name | Description |
serviceProvider | IServiceProvider |
options | LoggingServiceOptions |
Returns | |
---|---|
Type | Description |
GoogleLoggerProvider |
CreateLogger(String)
public ILogger CreateLogger(string logName)
Creates a GoogleLogger with the given log name.
Parameter | |
---|---|
Name | Description |
logName | String The name of the log. This will be combined with the log location (LogTarget) to generate the resource name for the log. |
Returns | |
---|---|
Type | Description |
ILogger |
CreateLogger(String, Action<IServiceProvider, Dictionary<String, String>>, Action<IServiceProvider, LogEntry, TraceTarget>)
[Obsolete("Added for backward compatibility only when moving GoogleLogger to Common.")]
public GoogleLogger CreateLogger(string logName, Action<IServiceProvider, Dictionary<string, string>> obsoleteLabelsGetter, Action<IServiceProvider, LogEntry, TraceTarget> obsoleteTraceContextGetter)
Creates a GoogleLogger with the given log name.
Parameters | |
---|---|
Name | Description |
logName | String |
obsoleteLabelsGetter | Action<IServiceProvider, Dictionary<String, String>> |
obsoleteTraceContextGetter | Action<IServiceProvider, LogEntry, TraceTarget> |
Returns | |
---|---|
Type | Description |
GoogleLogger |
Dispose()
public void Dispose()