[[["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-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eBaseLogger\u003c/code\u003e is an abstract class that serves as a foundation for creating custom loggers, offering functionalities like setting minimum log levels and using a clock for timestamping.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides methods for logging at different levels, including debug, error, info, and warning, with the ability to format messages and handle exceptions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBaseLogger\u003c/code\u003e allows for associating log entries with a specific type, making it easier to track the source of log messages using \u003ccode\u003eLoggerForType\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt uses an \u003ccode\u003eIClock\u003c/code\u003e to timestamp log entries, configurable through the \u003ccode\u003eClock\u003c/code\u003e property, and includes properties to check if logging is enabled for debug, error, info, and warning levels.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple versions available to access, with version 1.69.0 as the latest version of \u003ccode\u003eBaseLogger\u003c/code\u003e, and it has derived types that include \u003ccode\u003eConsoleLogger\u003c/code\u003e and \u003ccode\u003eMemoryLogger\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class BaseLogger (1.69.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.69.0 (latest)](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger)\n- [1.68.0](/dotnet/docs/reference/Google.Apis/1.68.0/Google.Apis.Logging.BaseLogger)\n- [1.60.0](/dotnet/docs/reference/Google.Apis/1.60.0/Google.Apis.Logging.BaseLogger)\n- [1.59.0](/dotnet/docs/reference/Google.Apis/1.59.0/Google.Apis.Logging.BaseLogger)\n- [1.55.0](/dotnet/docs/reference/Google.Apis/1.55.0/Google.Apis.Logging.BaseLogger)\n- [1.50.0](/dotnet/docs/reference/Google.Apis/1.50.0/Google.Apis.Logging.BaseLogger) \n\n public abstract class BaseLogger\n\nAn abstract base logger, upon which real loggers may be built. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e BaseLogger \n\nInherited Members\n-----------------\n\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.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \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\nDerived Types\n-------------\n\n[ConsoleLogger](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.ConsoleLogger) \n[MemoryLogger](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.MemoryLogger)\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### BaseLogger(LogLevel, IClock, Type)\n\n protected BaseLogger(LogLevel minimumLogLevel, IClock clock, Type forType)\n\nConstruct a [BaseLogger](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Logging.BaseLogger).\n\nProperties\n----------\n\n### Clock\n\n public IClock Clock { get; }\n\nThe [IClock](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.IClock) being used to timestamp log entries.\n\n### IsDebugEnabled\n\n public bool IsDebugEnabled { get; }\n\nIs Debug level logging enabled?\n\n### IsErrorEnabled\n\n public bool IsErrorEnabled { get; }\n\nIs error level logging enabled?\n\n### IsInfoEnabled\n\n public bool IsInfoEnabled { get; }\n\nIs info level logging enabled?\n\n### IsWarningEnabled\n\n public bool IsWarningEnabled { get; }\n\nIs warning level logging enabled?\n\n### LoggerForType\n\n public Type LoggerForType { get; }\n\nThe type from which entries are being logged. May be `null`.\n\n### MinimumLogLevel\n\n public LogLevel MinimumLogLevel { get; }\n\nLogging is enabled at this level and all higher levels.\n\nMethods\n-------\n\n### BuildNewLogger(Type)\n\n protected abstract ILogger BuildNewLogger(Type type)\n\nBuild a new logger of the derived concrete type, for use to log from the specified type.\n\n### Debug(string, params object\\[\\])\n\n public void Debug(string message, params object[] formatArgs)\n\nLogs a debug message.\n\n### Error(Exception, string, params object\\[\\])\n\n public void Error(Exception exception, string message, params object[] formatArgs)\n\nLogs an error message resulting from an exception.\n\n### Error(string, params object\\[\\])\n\n public void Error(string message, params object[] formatArgs)\n\nLogs an error message.\n\n### ForType(Type)\n\n public ILogger ForType(Type type)\n\nReturns a logger which will be associated with the specified type.\n\n### ForType\\\u003cT\\\u003e()\n\n public ILogger ForType\u003cT\u003e()\n\nReturns a logger which will be associated with the specified type.\n\n### Info(string, params object\\[\\])\n\n public void Info(string message, params object[] formatArgs)\n\nLogs an info message.\n\n### Log(LogLevel, string)\n\n protected abstract void Log(LogLevel logLevel, string formattedMessage)\n\nPerform the actual logging.\n\n### Warning(string, params object\\[\\])\n\n public void Warning(string message, params object[] formatArgs)\n\nLogs a warning.\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_)"]]