Class LogMessage


  • public class LogMessage
    extends Object
    A log message broadcast by a Logger.

    NB: The message is published on the calling thread by Logger.notifyListeners(org.scijava.log.LogMessage), not on a dedicated event dispatch thread by the EventService. This is done to avoid the overhead of the event service's synchronized pub/sub implementation, as well as to avoid potential infinite loops caused by debugging log messages surrounding event publication.

    Author:
    Matthias Arzt
    • Method Detail

      • source

        public LogSource source()
        Represents the source of the message.
      • level

        public int level()
        Log level of the message.
        See Also:
        LogLevel
      • text

        public String text()
        The content of this log message.
      • throwable

        public Throwable throwable()
        Exception associated with the log message.
      • time

        public Date time()
        Time of the creation of the log message.
      • attach

        public void attach​(Object value)
        Attach object to this log message. This can be used to attach additional information to the log message.