Google.Cloud.Diagnostics.Common - Class GoogleLoggerProvider (5.1.0)

[ProviderAlias("Google")]
public sealed class GoogleLoggerProvider : ILoggerProvider, IDisposable

Reference documentation and code samples for the Google.Cloud.Diagnostics.Common class GoogleLoggerProvider.

ILoggerProvider for Google Cloud Logging.

Inheritance

object > GoogleLoggerProvider

Namespace

GoogleCloudGoogle.Cloud.DiagnosticsCommon

Assembly

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
NameDescription
serviceProviderIServiceProvider
optionsLoggingServiceOptions
Returns
TypeDescription
GoogleLoggerProvider

CreateLogger(string)

public ILogger CreateLogger(string logName)

Creates a GoogleLogger with the given log name.

Parameter
NameDescription
logNamestring

The name of the log. This will be combined with the log location (LogTarget) to generate the resource name for the log.

Returns
TypeDescription
ILogger

Dispose()

public void Dispose()