struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Raible" <m...@raibledesigns.com>
Subject [OT] ServletExceptions in StartupServlet & Logging
Date Fri, 22 Feb 2002 17:12:12 GMT
Is it possible with Log4j or other logging mechanisms to show
ServletExceptions in the console.  They show up fine in my tomcat
logfile, but not in the stdout.  

In tomcat's log file I get:

2002-02-22 10:09:52 StandardContext[/onpoint]: Servlet /onpoint threw
load() exception
javax.servlet.ServletException: 'repositoryRootDir' Context Parameter is
not a valid directory
	at
com.onpoint.webapp.StartupServlet.init(StartupServlet.java:90)
	at javax.servlet.GenericServlet.init(GenericServlet.java:258)
	at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3267)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3384
)
	at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
	at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454)
	at
org.apache.catalina.core.StandardHost.install(StandardHost.java:712)
	at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:599)
	at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:777)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:46
3)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:155)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
	at
org.apache.catalina.core.StandardHost.start(StandardHost.java:612)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
	at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
	at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
	at
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
	at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
	at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
	at java.lang.reflect.Method.invoke(Native Method)
	at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

And I wan this to show up in either my application log or stdout so
System Administrators can see it - is this possible?

Here is my log4j.properties file:

log4j.rootCategory=info, stdout, R

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%p [%t] [%c] %C{1}.%M(%L)
| %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=onpoint.log

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

# If programmed properly the most messages would be at DEBUG 
# and the least at FATAL.

# Options are: DEBUG, INFO, WARN, ERROR, FATAL
log4j.category.Init=DEBUG
log4j.category.Digester=FATAL
log4j.category.Config=FATAL
log4j.category.Actions=DEBUG
log4j.category.Repository=FATAL
log4j.category.Persister=FATAL
log4j.category.Translator=DEBUG
log4j.category.Cache=FATAL
log4j.category.Validator=FATAL
log4j.category.Registry=FATAL
log4j.category.Event=FATAL
log4j.category.Filter=DEBUG
log4j.category.Test=DEBUG

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message