Class GoogleLogger (4.4.0)

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

ILogger for Google Cloud Logging.

Inheritance

Object > GoogleLogger

Implements

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
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
Uri

IsEnabled(LogLevel)

public bool IsEnabled(LogLevel logLevel)
Parameter
Name Description
logLevel LogLevel
Returns
Type Description
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 LogLevel
eventId EventId
state TState
exception Exception
formatter Func<TState, Exception, String>
Type Parameter
Name Description
TState