net.dclausen.util
Class SignalLogger
java.lang.Object
net.dclausen.util.SignalInterceptor
net.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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 usedlevel
- the level to use; if null the INFO level will be used
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