com.caucho.log
Class JmsHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by com.caucho.log.JmsHandler

public class JmsHandler
extends java.util.logging.Handler

Sends formatted messages to JMS queue/topic


Constructor Summary
JmsHandler()
           
 
Method Summary
 void addTarget(Destination target)
          Adds a target (queue or jms destination)
 void close()
          Closes the handler.
 void flush()
          Flushes the buffer.
 void init()
          Initialize the handler
 void publish(java.util.logging.LogRecord record)
          Publishes the record.
 void setConnectionFactory(ConnectionFactory factory)
          Sets the connection factory
 java.lang.String toString()
           
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JmsHandler

public JmsHandler()
Method Detail

setConnectionFactory

public void setConnectionFactory(ConnectionFactory factory)
Sets the connection factory


addTarget

public void addTarget(Destination target)
Adds a target (queue or jms destination)


init

@PostConstruct
public void init()
          throws ConfigException
Initialize the handler

Throws:
ConfigException

publish

public void publish(java.util.logging.LogRecord record)
Publishes the record.

Specified by:
publish in class java.util.logging.Handler

flush

public void flush()
Flushes the buffer.

Specified by:
flush in class java.util.logging.Handler

close

public void close()
Closes the handler.

Specified by:
close in class java.util.logging.Handler

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object