com.metamatrix.common.log
Class DbLogListener
java.lang.Object
com.metamatrix.common.log.DbLogListener
- All Implemented Interfaces:
- LogListener
public class DbLogListener
- extends java.lang.Object
- implements LogListener
Listener class to log messages to the Database
Constructor Summary |
DbLogListener(java.util.Properties prop,
boolean enable)
Listen for log messages and write them to a database. |
Method Summary |
void |
enableDBLogging(boolean enable)
|
void |
log(int level,
java.lang.String context,
java.lang.Object msg)
|
void |
log(int level,
java.lang.String context,
java.lang.Throwable t,
java.lang.Object msg)
|
void |
shutdown()
Shut down this listener, requesting it clean up and release any resources it
may have acquired during its use. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DbLogListener
public DbLogListener(java.util.Properties prop,
boolean enable)
- Listen for log messages and write them to a database.
log
public void log(int level,
java.lang.String context,
java.lang.Object msg)
- Specified by:
log
in interface LogListener
log
public void log(int level,
java.lang.String context,
java.lang.Throwable t,
java.lang.Object msg)
- Specified by:
log
in interface LogListener
shutdown
public void shutdown()
- Description copied from interface:
LogListener
- Shut down this listener, requesting it clean up and release any resources it
may have acquired during its use. The listener is free to ignore this
request if it is not responsible for managing the resources it uses or if
there are no resources.
- Specified by:
shutdown
in interface LogListener
enableDBLogging
public void enableDBLogging(boolean enable)
Copyright © 2009. All Rights Reserved.