public abstract class BaseLogger : object, ILogger
An abstract base logger, upon which real loggers may be built.
Implements
ILoggerNamespace
Google.Apis.LoggingAssembly
Google.Apis.Core.dll
Constructors
BaseLogger(LogLevel, IClock, Type)
protected BaseLogger(LogLevel minimumLogLevel, IClock clock, Type forType)
Construct a BaseLogger .
Properties
Clock
public IClock Clock { get; }
The IClock being used to timestamp log entries.
IsDebugEnabled
public bool IsDebugEnabled { get; }
Is Debug level logging enabled?
IsErrorEnabled
public bool IsErrorEnabled { get; }
Is error level logging enabled?
IsInfoEnabled
public bool IsInfoEnabled { get; }
Is info level logging enabled?
IsWarningEnabled
public bool IsWarningEnabled { get; }
Is warning level logging enabled?
LoggerForType
public Type LoggerForType { get; }
The type from which entries are being logged. May be null
.
Type
MinimumLogLevel
public LogLevel MinimumLogLevel { get; }
Logging is enabled at this level and all higher levels.
Methods
BuildNewLogger(Type)
protected
abstract
ILogger
BuildNewLogger
(
Type
type
)
Build a new logger of the derived concrete type, for use to log from the specified type.
type
Type
The type from which entries are being logged.
Debug(String, Object[])
public void Debug(string message, params object[] formatArgs)
Logs a debug message.
Error(Exception, String, Object[])
public void Error(Exception exception, string message, params object[] formatArgs)
Logs an error message resulting from an exception.
Error(String, Object[])
public void Error(string message, params object[] formatArgs)
Logs an error message.
ForType(Type)
public
ILogger
ForType
(
Type
type
)
Returns a logger which will be associated with the specified type.
type
Type
Type to which this logger belongs.
ForType<T>()
public ILogger ForType<T>()
Returns a logger which will be associated with the specified type.
T
Info(String, Object[])
public void Info(string message, params object[] formatArgs)
Logs an info message.
Log(LogLevel, String)
protected abstract void Log(LogLevel logLevel, string formattedMessage)
Perform the actual logging.
Warning(String, Object[])
public void Warning(string message, params object[] formatArgs)
Logs a warning.