|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.csstudio.logging.JMSLogWriter
public class JMSLogWriter
Thread that reads log messages from queue and writes them to JMS.
Uses a Formatter
, but only invokes Formatter.formatMessage()
to expand parameters in the message text.
If the log record contains exception info, that is added to the message text.
The remaining LogRecord
elements are directly placed
in the JMS log message and not formatted into (possibly) one
long string via a call to Formatter.format()
.
Constructor Summary | |
---|---|
JMSLogWriter(java.lang.String application_id,
java.lang.String jms_url,
java.lang.String topic,
java.util.concurrent.BlockingQueue<java.util.logging.LogRecord> records,
java.util.logging.Formatter formatter)
Initialize |
Method Summary | |
---|---|
void |
onException(JMSException exception)
JMS Exception handler |
void |
start()
Start the writer's background thread |
void |
stop()
Stop the writer's background thread |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JMSLogWriter(java.lang.String application_id, java.lang.String jms_url, java.lang.String topic, java.util.concurrent.BlockingQueue<java.util.logging.LogRecord> records, java.util.logging.Formatter formatter)
application_id
- Application ID to include in JMS messagesjms_url
- JMS server URLtopic
- JMS topicrecords
- BlockingQueue
from which log messages are readformatter
- Formatter
that's partially used to format the message textMethod Detail |
---|
public void start()
public void stop()
public void onException(JMSException exception)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |