Mailing List
Home
Forum Home
Maven - Project building tool
Axis - Java SOAP implementation
Lucene - Full-featured text search engine APIs
Cocoon - MVC web framework based on XML/XSL
Fop - Create PDF, PCL, PS, SVG, XML driven by XSL formatting objects.
Log4J - A log library
POI - Java Excel, Word and other Microsoft Office files manipulating library
Oracle database error code ...
Subjects
log4j warning: No appenders could be found
java security AccessControlException: access denied (java io FilePermission clie
java lang InstantiationException: org apache tools ant Main
Apache Axis Tutorial
Subject: Struts <logic iterate >
log4j properties How to parse outpu to multiple files
configuring log4j with BEA Weblogic 8 1
How to use XSL FOP Java together
JSP precompile
Proposal: Adding jar manifest classpath in jar and war plugins
Servlet File Download dialog problem (IE6,Adobe 6 0)
java security AccessControlException: access denied (java io FilePermission
Unsupported major minor version 48 0 problem while running the an
   telope task
Subject: axis wsdl2java Ant Task usage
net sf hibernate MappingException: Error reading resource: test/User hbm xml
Building EAR ANT Script for websphere 5 0
CREATING WAR Files
Classpath problem
jsp data into Excel
Jboss 3 2 3+ vs Tomcat Axis Question
RE: How to include jars and add them into the MANIFEST MF/Class Path
attribute
Printing problem
Subject: InstantiationException
Couldn 't find trusted certificate
Please : How can one install ant 1 6 0 under Eclipse 2 1 ?
Excel: Too many different cell formats
Subject: AXIS: tomcat timeout ?
1 3 final: now giving me java io FileNotFoundException (Too many
open files)
XDoclet, Struts and Maven: Where to start? SOLUTION
Subject: Running junit tests fails
 
JSF/Struts logs ok Servlet/JSP does not?

JSF/Struts logs ok Servlet/JSP does not?

2007-11-30       - By Warren

 Back
Reply:     1     2     3  

I have a JSF app, a struts app and a Servlet/JSP app running in the same
Tomcat 5.5 server. The JSF and Servlet app initialize and run log4j with no
problems. The Servlet/JSP app does not initialize log4j. I am running Tomcat
with -Dlog4j.debug set.

The init method of the initial servlet loaded on startup, the
log4j.properties file and the Tomcat stdout log are below:

init method
...

// props is the path to the log4j.properties file

PropertyConfigurator.configure(props);
Logger log = Logger.getRootLogger();
log.debug("Logger Works");

######

log4j.properties file

# Global logging configuration
log4j.rootLogger=DEBUG, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n

######

stdout Tomcat log with -Dlog4j.debug set

...
-- ---- --> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@(protected)
.
log4j: Using URL
[file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapp
s/ecr/WEB-INF/classes/log4j.properties] for automatic log4j configuration.
log4j: Reading configuration from URL
file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps
/ecr/WEB-INF/classes/log4j.properties
log4j: Could not find root logger information. Is this OK?
log4j: Finished configuring.
log4j: Could not find root logger information. Is this OK?
log4j: Finished configuring.
log4j:WARN No appenders could be found for logger
(com.ecr.servlets.SetupServlet).
log4j:WARN Please initialize the log4j system properly.

#######

My JSF and Struts apps have an identical copy of the log4j.properties file
as the Servlet/JSP app and it is located in the same place WEB-INF/classes.
And, all three apps are useing the same version of log4j version 1.2.8.

The only thing I can think of is that I am not initializing my Servlet/JSF
log4j correctly the same way JSF and Struts are. What do I need to do to
make it work?

Thanks,

Warren


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: log4j-user-unsubscribe@(protected)
For additional commands, e-mail: log4j-user-help@(protected)