Show / Hide Table of Contents

Interface ILogger

Describes a logging interface which is used for outputting messages.

Namespace: Google.Apis.Logging
Assembly: Google.Apis.Core.dll
Syntax
public interface ILogger

Properties

IsDebugEnabled

Gets an indication whether debug output is logged or not.

Declaration
bool IsDebugEnabled { get; }
Property Value
Type Description
System.Boolean

Methods

Debug(String, Object[])

Logs a debug message.

Declaration
void Debug(string message, params object[] formatArgs)
Parameters
Type Name Description
System.String message

The message to log.

System.Object[] formatArgs

String.Format arguments (if applicable).

Error(Exception, String, Object[])

Logs an error message resulting from an exception.

Declaration
void Error(Exception exception, string message, params object[] formatArgs)
Parameters
Type Name Description
System.Exception exception
System.String message

The message to log.

System.Object[] formatArgs

String.Format arguments (if applicable).

Error(String, Object[])

Logs an error message.

Declaration
void Error(string message, params object[] formatArgs)
Parameters
Type Name Description
System.String message

The message to log.

System.Object[] formatArgs

String.Format arguments (if applicable).

ForType(Type)

Returns a logger which will be associated with the specified type.

Declaration
ILogger ForType(Type type)
Parameters
Type Name Description
System.Type type

Type to which this logger belongs.

Returns
Type Description
ILogger

A type-associated logger.

ForType<T>()

Returns a logger which will be associated with the specified type.

Declaration
ILogger ForType<T>()
Returns
Type Description
ILogger

A type-associated logger.

Type Parameters
Name Description
T

Info(String, Object[])

Logs an info message.

Declaration
void Info(string message, params object[] formatArgs)
Parameters
Type Name Description
System.String message

The message to log.

System.Object[] formatArgs

String.Format arguments (if applicable).

Warning(String, Object[])

Logs a warning.

Declaration
void Warning(string message, params object[] formatArgs)
Parameters
Type Name Description
System.String message

The message to log.

System.Object[] formatArgs

String.Format arguments (if applicable).

Extension Methods

Utilities.ThrowIfNull<T>(T, String)
In This Article
Back to top