net.dclausen.util
Class SignalLogger

java.lang.Object
  extended bynet.dclausen.util.SignalInterceptor
      extended bynet.dclausen.util.SignalLogger

public class SignalLogger
extends SignalInterceptor

A SignalInterceptor which logs incoming signals using the java logging API, then invokes the next handler in the chain.


Constructor Summary
SignalLogger()
          Construct a SignalLogger which will log signals to the root Logger at the INFO level.
SignalLogger(Logger logger, Level level)
          Construct a SignalLogger which will log signals to the given Logger at the given Level.
 
Method Summary
protected  boolean handle(String signame)
          Log the signal and return true, so that the default handler will be invoked.
 
Methods inherited from class net.dclausen.util.SignalInterceptor
register, registerQuietly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignalLogger

public SignalLogger()
Construct a SignalLogger which will log signals to the root Logger at the INFO level.


SignalLogger

public SignalLogger(Logger logger,
                    Level level)
Construct a SignalLogger which will log signals to the given Logger at the given Level.

Parameters:
logger - the logger to use; if null, the root logger will be used
level - the level to use; if null the INFO level will be used
Method Detail

handle

protected boolean handle(String signame)
Log the signal and return true, so that the default handler will be invoked.

Specified by:
handle in class SignalInterceptor