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 Details

  • Method Details

    • getMemory

      public String getMemory()
      Returns the string representation of everything the logger has logged since its instantiation, or the last call to clear().
      Returns:
      Memory of the logger instance.
    • log

      public MemoryLogger log​(String string)
      Description copied from class: Logger
      Logs the given string.
      Specified by:
      log in class Logger<MemoryLogger>
      Parameters:
      string - String to log.
      Returns:
      This logger.
    • clear

      public MemoryLogger clear()
      Description copied from class: Logger
      Clears the logger, discarding anything it has logged in the past.
      Specified by:
      clear in class Logger<MemoryLogger>
      Returns:
      This logger.