public class LogMessage extends Object
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.
Constructor and Description |
---|
LogMessage(LogSource source,
int level,
Object msg) |
LogMessage(LogSource source,
int level,
Object message,
Throwable throwable) |
Modifier and Type | Method and Description |
---|---|
void |
attach(Object value)
Attach object to this log message.
|
Collection<Object> |
attachments()
Collection of objects that have been attached to this message with
attach(Object) . |
int |
level()
Log level of the message.
|
LogSource |
source()
Represents the source of the message.
|
String |
text()
The content of this log message.
|
Throwable |
throwable()
Exception associated with the log message.
|
Date |
time()
Time of the creation of the log message.
|
String |
toString() |
public LogSource source()
public int level()
LogLevel
public String text()
public Throwable throwable()
public Date time()
public Collection<Object> attachments()
attach(Object)
.public void attach(Object value)
Copyright © 2015–2022 SciJava. All rights reserved.