Class GoogleLogger (4.4.0)

[Obsolete("Use Google.Cloud.Diagnostics.Common.GoogleLogger instead.")]
public sealed class GoogleLogger : ILogger

Microsoft.Extensions.Logging.ILogger for Google Cloud Logging.

Inheritance

System.Object > GoogleLogger

Implements

Microsoft.Extensions.Logging.ILogger

Namespace

Google.Cloud.Diagnostics.AspNetCore

Assembly

Google.Cloud.Diagnostics.AspNetCore.dll

Methods

BeginScope<TState>(TState)

public IDisposable BeginScope<TState>(TState state)
Parameter
Name Description
state TState
Returns
Type Description
System.IDisposable
Type Parameter
Name Description
TState

GetGcpConsoleLogsUrl()

public Uri GetGcpConsoleLogsUrl()

For diagnostic purposes. Builds and returns the URL where the entries logged by this GoogleLogger can be seen on the Google Cloud Logging Console.

Returns
Type Description
System.Uri

IsEnabled(LogLevel)

public bool IsEnabled(LogLevel logLevel)
Parameter
Name Description
logLevel Microsoft.Extensions.Logging.LogLevel
Returns
Type Description
System.Boolean

Log<TState>(LogLevel, EventId, TState, Exception, Func<TState, Exception, String>)

public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Parameters
Name Description
logLevel Microsoft.Extensions.Logging.LogLevel
eventId Microsoft.Extensions.Logging.EventId
state TState
exception System.Exception
formatter System.Func<TState, System.Exception, System.String>
Type Parameter
Name Description
TState