Class MemoryLogger
java.lang.Object
it.poliba.sisinflab.tinyme.util.logging.Logger<MemoryLogger>
it.poliba.sisinflab.tinyme.util.logging.MemoryLogger
public final class MemoryLogger extends Logger<MemoryLogger>
Logger class that logs to a memory buffer.
- See Also:
Logger
-
Constructor Summary
Constructors Constructor Description MemoryLogger() -
Method Summary
Modifier and Type Method Description MemoryLoggerclear()Clears the logger, discarding anything it has logged in the past.StringgetMemory()Returns the string representation of everything the logger has logged since its instantiation, or the last call toclear().MemoryLoggerlog(String string)Logs the given string.
-
Constructor Details
-
MemoryLogger
public MemoryLogger()
-
-
Method Details
-
getMemory
Returns the string representation of everything the logger has logged since its instantiation, or the last call toclear().- Returns:
- Memory of the logger instance.
-
log
Description copied from class:LoggerLogs the given string.- Specified by:
login classLogger<MemoryLogger>- Parameters:
string- String to log.- Returns:
- This logger.
-
clear
Description copied from class:LoggerClears the logger, discarding anything it has logged in the past.- Specified by:
clearin classLogger<MemoryLogger>- Returns:
- This logger.
-