jim shirreffs wrote:
> "HalcyonWild" <Halcyon.Wild@gmail.com> wrote in message
> news:1131736301.694341.186110@g44g2000cwa.googlegr oups.com...
> >
> > jim shirreffs wrote:
> >> I do not use a log4i properties file, I was happy with the default Tomcat
> >> logging in previous Tomcats.
> >> I think I must have a lo4j problem or a common-logging problem. If I
> >> could
> >> get any kind of logging working I would be happy.
> >>
> >> I will look around for a log4j.properties file and drop that into
> >> common/classses and see what happens
> >>
> >> jim
> >>
> >
> >
> >
> > You top posted so I deleted the below stuff, creates a bit of confusion
> > here.
> >
> > I hope you are putting the correct logging level in log4j.properties
> > for your package. Make the root category as the lowest level of log,
> > otherwise.
> >
> > Also, use logger.log for test, so that they get printed, whatever the
> > log level.
> > And yes, it seems to me that log4j.properties should be in the
> > classpath. Not sure about this though.
> >
>
> Sorry bout the top posting, been a while since I posted on usenet news, I
> can usally google and find a solution to whatever problem I am having, but
> this one is driving me crazy. I am going to remove every damn
> log4j.properties on this computer. I have been building axis/hibernate
> applications and perhaps Tomcat is picking up one of those which might be my
> problem. If that does not work then I'll try a reinstall of Tomcat. Thanks
> for the reply
>
> jim
Jim, take a look at this, I found this on the Jboss site.
http://docs.jboss.org/jbossas/gettin...ur.html#d0e256
Here it talks about log4j.xml file. My project uses the properties
file. See if this might help. I think you need to specify the Appender
class name in properties/xml, which might not be included in your
classpath. Try putting both the log4j prop/xml file in the classpath,
as well as the logging classes. I guess tomcat also has its own logging
classes, which you need to include in classpath.
<appender name="CMP"
class="org.jboss.logging.appender.RollingFileAppen der">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler "/>
<param name="File" value="${jboss.server.home.dir}/log/cmp.log"/>
<param name="Append" value="false"/>
<param name="MaxFileSize" value="500KB"/>
<param name="MaxBackupIndex" value="1"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
</layout>
</appender>
<category name="org.jboss.ejb.plugins.cmp">
<priority value="DEBUG" />
<appender-ref ref="CMP"/>
</category>