public sealed class ConsoleLogger : BaseLoggerA logger than logs to StdError or StdOut.
Namespace
Google.Apis.LoggingAssembly
Google.Apis.Core.dll
Constructors
ConsoleLogger(LogLevel, bool, IClock)
public ConsoleLogger(LogLevel minimumLogLevel, bool logToStdOut = false, IClock clock = null)Construct a ConsoleLogger.
| Parameters | |
|---|---|
| Name | Description |
minimumLogLevel |
LogLevelLogging will be enabled at this level and all higher levels. |
logToStdOut |
bool
|
clock |
IClockOptional IClock; will use the system clock if |
Properties
LogToStdOut
public bool LogToStdOut { get; }false to log to StdError; true to log to StdOut.
| Property Value | |
|---|---|
| Type | Description |
bool |
|
Methods
BuildNewLogger(Type)
protected override ILogger BuildNewLogger(Type type)Build a new logger of the derived concrete type, for use to log from the specified type.
| Parameter | |
|---|---|
| Name | Description |
type |
TypeThe type from which entries are being logged. |
| Returns | |
|---|---|
| Type | Description |
ILogger |
A new ILogger instance, logging from the specified type. |
Log(LogLevel, string)
protected override void Log(LogLevel logLevel, string formattedMessage)Perform the actual logging.
| Parameters | |
|---|---|
| Name | Description |
logLevel |
LogLevelThe LogLevel of this log entry. |
formattedMessage |
stringThe fully formatted log message, ready for logging. |