[[["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-08-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eConsoleLogger\u003c/code\u003e class is a logger that outputs logs to either StdError or StdOut, depending on the configuration.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from the \u003ccode\u003eBaseLogger\u003c/code\u003e class and provides methods for logging at various levels like Debug, Info, Warning, and Error.\u003c/p\u003e\n"],["\u003cp\u003eThe constructor for \u003ccode\u003eConsoleLogger\u003c/code\u003e allows you to set the minimum log level, choose between StdOut and StdError for output, and optionally use a custom clock.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eConsoleLogger\u003c/code\u003e includes methods such as \u003ccode\u003eBuildNewLogger\u003c/code\u003e to create loggers for specific types and \u003ccode\u003eLog\u003c/code\u003e for performing the actual logging process.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLogToStdOut\u003c/code\u003e property indicates whether the logger is logging to standard output (\u003ccode\u003etrue\u003c/code\u003e) or standard error (\u003ccode\u003efalse\u003c/code\u003e).\u003c/p\u003e\n"]]],[],null,["# Class ConsoleLogger (1.69.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.69.0 (latest)](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.ConsoleLogger)\n- [1.68.0](/dotnet/docs/reference/Google.Apis/1.68.0/Google.Apis.Logging.ConsoleLogger)\n- [1.60.0](/dotnet/docs/reference/Google.Apis/1.60.0/Google.Apis.Logging.ConsoleLogger)\n- [1.59.0](/dotnet/docs/reference/Google.Apis/1.59.0/Google.Apis.Logging.ConsoleLogger)\n- [1.55.0](/dotnet/docs/reference/Google.Apis/1.55.0/Google.Apis.Logging.ConsoleLogger)\n- [1.50.0](/dotnet/docs/reference/Google.Apis/1.50.0/Google.Apis.Logging.ConsoleLogger) \n\n public sealed class ConsoleLogger : BaseLogger\n\nA logger than logs to StdError or StdOut. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e [BaseLogger](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger) \\\u003e ConsoleLogger \n\nInherited Members\n-----------------\n\n[BaseLogger.Clock](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_Clock) \n[BaseLogger.LoggerForType](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_LoggerForType) \n[BaseLogger.MinimumLogLevel](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_MinimumLogLevel) \n[BaseLogger.IsDebugEnabled](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_IsDebugEnabled) \n[BaseLogger.IsInfoEnabled](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_IsInfoEnabled) \n[BaseLogger.IsWarningEnabled](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_IsWarningEnabled) \n[BaseLogger.IsErrorEnabled](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_IsErrorEnabled) \n[BaseLogger.ForType\\\u003cT\\\u003e()](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_ForType__1) \n[BaseLogger.ForType(Type)](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_ForType_System_Type_) \n[BaseLogger.Debug(string, params object\\[\\])](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_Debug_System_String_System_Object___) \n[BaseLogger.Info(string, params object\\[\\])](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_Info_System_String_System_Object___) \n[BaseLogger.Warning(string, params object\\[\\])](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_Warning_System_String_System_Object___) \n[BaseLogger.Error(Exception, string, params object\\[\\])](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_Error_System_Exception_System_String_System_Object___) \n[BaseLogger.Error(string, params object\\[\\])](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_Error_System_String_System_Object___) \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) \n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Apis.Logging](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging)\n\nAssembly\n--------\n\nGoogle.Apis.Core.dll\n\nConstructors\n------------\n\n### ConsoleLogger(LogLevel, bool, IClock)\n\n public ConsoleLogger(LogLevel minimumLogLevel, bool logToStdOut = false, IClock clock = null)\n\nConstruct a [ConsoleLogger](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.ConsoleLogger).\n\nProperties\n----------\n\n### LogToStdOut\n\n public bool LogToStdOut { get; }\n\n`false` to log to StdError; `true` to log to StdOut.\n\nMethods\n-------\n\n### BuildNewLogger(Type)\n\n protected override ILogger BuildNewLogger(Type type)\n\nBuild a new logger of the derived concrete type, for use to log from the specified type.\n\n**Overrides** \n[BaseLogger.BuildNewLogger(Type)](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_BuildNewLogger_System_Type_)\n\n### Log(LogLevel, string)\n\n protected override void Log(LogLevel logLevel, string formattedMessage)\n\nPerform the actual logging.\n\n**Overrides** \n[BaseLogger.Log(LogLevel, string)](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger#Google_Apis_Logging_BaseLogger_Log_Google_Apis_Logging_LogLevel_System_String_)\n\nExtension Method\n----------------\n\n[Utilities.ThrowIfNull\\\u003cT\\\u003e(T, string)](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Utilities#Google_Apis_Util_Utilities_ThrowIfNull__1___0_System_String_)"]]