Class GoogleLogger (4.4.0)

public sealed class GoogleLogger : ILogger

ILogger for Google Cloud Logging.

Inheritance

Object > GoogleLogger

Implements

ILogger

Namespace

Google.Cloud.Diagnostics.Common

Assembly

Google.Cloud.Diagnostics.Common.dll

Methods

BeginScope<TState>(TState)

public IDisposable BeginScope<TState>(TState state)
Parameter
NameDescription
stateTState
Returns
TypeDescription
IDisposable
Type Parameter
NameDescription
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
TypeDescription
Uri

IsEnabled(LogLevel)

public bool IsEnabled(LogLevel logLevel)
Parameter
NameDescription
logLevelLogLevel
Returns
TypeDescription
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
NameDescription
logLevelLogLevel
eventIdEventId
stateTState
exceptionException
formatterFunc<TState, Exception, String>
Type Parameter
NameDescription
TState

Extension Methods