Package com.iizix

Class LogEntry

java.lang.Object
com.iizix.LogEntry

public class LogEntry extends Object
The log entry.
Author:
Christopher Mindus
  • Field Details

    • timeStamp

      public final long timeStamp
      Time stamp of the event.
    • level

      public final int level
      Level of the event.
    • loggerName

      public final String loggerName
      The logger name.
    • originator

      public final String originator
      The originator of the event.
    • thread

      public final String thread
      The Thread.toString() of the event.
    • msg

      public final String msg
      The event message with potential "LF" characters for line breaks (no CR/LF, just LF).
  • Constructor Details

    • LogEntry

      public LogEntry(long timeStamp, int level, String loggerName, String originator, String thread, String msg)
      Called when an event is logged.
      Parameters:
      timeStamp - the time stamp of the event.
      level - the log level 1-7 (SEVERE-FINEST).
      loggerName - name of the logger.
      originator - the originator of the event, null if not defined.
      thread - the thread ID.
      msg - the message to be logged.
      See Also:
  • Method Details

    • toString

      public String toString()
      Formats the log entry as standard for printing to e.g. file or console.
      Overrides:
      toString in class Object
      Returns:
      A String formatted as e.g:
         [INFO]    29 Aug 2016  17:22:19.873  <system>  <com.iizigo.translate.EditorTranslationEngine>  Thread[main,6,main]  Translation engine ready: Google Translate is Ready