Package com.iizix

Class LogEntry


  • public class LogEntry
    extends java.lang.Object
    The log entry.
    Author:
    Christopher Mindus
    • Field Summary

      Fields 
      Modifier and TypeFieldDescription
      intlevel
      Level of the event.
      java.lang.StringloggerName
      The logger name.
      java.lang.Stringmsg
      The event message with potential "LF" characters for line breaks (no CR/LF, just LF).
      java.lang.Stringoriginator
      The originator of the event.
      java.lang.Stringthread
      The Thread.toString() of the event.
      longtimeStamp
      Time stamp of the event.
    • Constructor Summary

      Constructors 
      ConstructorDescription
      LogEntry​(long timeStamp, int level, java.lang.String loggerName, java.lang.String originator, java.lang.String thread, java.lang.String msg)
      Called when an event is logged.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringtoString()
      Formats the log entry as standard for printing to e.g.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • timeStamp

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

        public final int level
        Level of the event.
      • loggerName

        public final java.lang.String loggerName
        The logger name.
      • originator

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

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

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

      • LogEntry

        public LogEntry​(long timeStamp,
                        int level,
                        java.lang.String loggerName,
                        java.lang.String originator,
                        java.lang.String thread,
                        java.lang.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:
        ILog
    • Method Detail

      • toString

        public java.lang.String toString()
        Formats the log entry as standard for printing to e.g. file or console.
        Overrides:
        toString in class java.lang.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