Send feedback
Class MemoryLogger (1.69.0) Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
public sealed class MemoryLogger : BaseLogger
A logger than logs to an in-memory buffer.
Generally for use during tests.
Namespace
Google.Apis.Logging
Assembly
Google.Apis.Core.dll
Constructors
MemoryLogger(LogLevel, int, IClock)
public MemoryLogger(LogLevel minimumLogLevel, int maximumEntryCount = 1000, IClock clock = null)
minimumLogLevel
LogLevel
Logging will be enabled at this level and all higher levels.
maximumEntryCount
int
The maximum number of log entries. Further log entries will be silently discarded.
clock
IClock
Optional IClock
; will use the system clock if null
.
Properties
LogEntries
public IList<string> LogEntries { get; }
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."],[],[]]