Class REPLLogEntry

java.lang.Object
de.uni_kiel.rz.fdr.repl.REPLLogEntry
All Implemented Interfaces:
Serializable

public class REPLLogEntry extends Object implements Serializable
Represents a single log message to be used by REPLLog.
See Also:
  • Constructor Details

    • REPLLogEntry

      public REPLLogEntry(Instant timestamp, REPLLogEntry.LOG_LEVEL level, Object... messages)
      Create a new log entry.
      Parameters:
      timestamp - The timestamp of the event that triggered this message.
      level - The log level of the message.
      messages - The messages to log. The first argument can use the "{}" placeholder to format the succeeding arguments.
    • REPLLogEntry

      public REPLLogEntry(REPLLogEntry.LOG_LEVEL level, Object... messages)
      Create a new log entry with the timestamp set to now.
      Parameters:
      level - The log level of the message.
      messages - The messages to log. The first argument can use the "{}" placeholder to format the succeeding arguments.
    • REPLLogEntry

      public REPLLogEntry(String level, Object... messages)
      Create a new log entry with the timestamp set to now.
      Parameters:
      level - The textual representation of the message's log level.
      messages - The messages to log. The first argument can use the "{}" placeholder to format the succeeding arguments.
  • Method Details

    • getTimestamp

      public Instant getTimestamp()
      Get the message's event timestamp.
      Returns:
      The message's event timestamp.
    • getLevel

      public REPLLogEntry.LOG_LEVEL getLevel()
      Get the log level of the message.
      Returns:
      The message's log level.
    • getMessage

      public String getMessage()
      Get the textual representation of the message's payload.
      Returns:
      The message's payload.
    • toString

      public String toString()
      Overrides:
      toString in class Object