public class ReportContextListener extends Object implements javax.servlet.ServletContextListener
ServletContextListener that triggers diagnostic reports when the web application starts.
The reports to be logged are determined by system properties and executed through a simple Executor. This is useful for logging
environment/configuration details at application startup time.
To use it, register this listener in web.xml.
<listener>
<listener-class>org.usefultoys.slf4j.report.ReportContextListener</listener-class>
</listener>
| Constructor and Description |
|---|
ReportContextListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent event)
Invoked when the web application is shutting down.
|
void |
contextInitialized(javax.servlet.ServletContextEvent event)
Invoked when the web application is starting up.
|
public void contextDestroyed(javax.servlet.ServletContextEvent event)
contextDestroyed in interface javax.servlet.ServletContextListenerevent - the servlet context eventpublic void contextInitialized(javax.servlet.ServletContextEvent event)
Reporter to log the default reports using a simple synchronous executor.contextInitialized in interface javax.servlet.ServletContextListenerevent - the servlet context eventCopyright © 2010–2025. All rights reserved.