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 MemoryLogger
clear()
Clears the logger, discarding anything it has logged in the past.String
getMemory()
Returns the string representation of everything the logger has logged since its instantiation, or the last call toclear()
.MemoryLogger
log(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:Logger
Logs the given string.- Specified by:
log
in classLogger<MemoryLogger>
- Parameters:
string
- String to log.- Returns:
- This logger.
-
clear
Description copied from class:Logger
Clears the logger, discarding anything it has logged in the past.- Specified by:
clear
in classLogger<MemoryLogger>
- Returns:
- This logger.
-