Send feedback
Class ConsoleLogger (1.69.0) Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
public sealed class ConsoleLogger : BaseLogger
A logger than logs to StdError or StdOut.
Namespace
Google.Apis.Logging
Assembly
Google.Apis.Core.dll
Constructors
ConsoleLogger(LogLevel, bool, IClock)
public ConsoleLogger(LogLevel minimumLogLevel, bool logToStdOut = false, IClock clock = null)
minimumLogLevel
LogLevel
Logging will be enabled at this level and all higher levels.
logToStdOut
bool
true
to log to StdOut, defaults to logging to StdError.
clock
IClock
Optional IClock
; will use the system clock if null
.
Properties
LogToStdOut
public bool LogToStdOut { get; }
false
to log to StdError; true
to log to StdOut.
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.
type
Type
The type from which entries are being logged.
A new ILogger
instance, logging from the specified type.
Overrides
Log(LogLevel, string)
protected override void Log(LogLevel logLevel, string formattedMessage)
Perform the actual logging.
formattedMessage
string
The fully formatted log message, ready for logging.
Overrides
Extension Method
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-30 UTC."],[],[]]