logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Warren" <war...@clarksnutrition.com>
Subject RE: JSF/Struts logs ok Servlet/JSP does not?
Date Fri, 30 Nov 2007 19:44:00 GMT
My mistake, The log4j.properties file got opened up in wordpad and then
saved. I created a new one in a text file and it started to work perfectly.
Windows crap!

Thanks for your time.

Warren

> -----Original Message-----
> From: Jacob Kjome [mailto:hoju@visi.com]
> Sent: Friday, November 30, 2007 11:04 AM
> To: Log4J Users List
> Subject: Re: JSF/Struts logs ok Servlet/JSP does not?
>
>
> That's strange.  BTW, the log4j.debug output you provided shows automatic
> configuration.  Given that you say you are manually configuring
> Log4j, I would
> expect to see that output as well.  Did you just leave that out for some
> reason, or aren't you seeing it?  You shouldn't need to manually
> configure
> Log4j if you have log4j.jar in WEB-INF/lib and log4j.properties in
> WEB-INF/classes.
>
> I'm not quite sure what to tell you, other than try a newer
> version of Log4j
> and maybe verify the output.
>
> Note that, normally, you'd obtain a logger by
> Logger.getLogger("somename")
> instead of directly abtaining the root logger.  But, of course,
> that beside
> the point until the config loading works properly.
>
>
> Jake
>
> On Thu, 29 Nov 2007 21:04:17 -0800
>   "Warren" <warren@clarksnutrition.com> wrote:
> > 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@30e280
> > .
> > log4j: Using URL
> >
> [file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%20
5.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@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message