Hello Martin,
Thanks for your help.
I have created the "log4j.properties" with the content you mentionned in
my "src" folder, to that it is automatically put in the
"WEB-INF\classes" folder.
But unfortunately that does not change anything at Cocoon startup, I am
still getting the message :
log4j:WARN No appenders could be found for logger
(org.apache.catalina.startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.
Seems this file is not taken into account. I cannot find any trace of it
in the logs.
I am stuck here, and I cannot find more helpful documentation on log4j
integration with Cocoon.
Any help will be very appreciated...
Best Regards,
Nicolas
Martin Geissler a écrit :
Hello Nicolas,
For your secound question give this a try:
Create a file named " log4j.properties" at
"D:\cocoon-2.1.9\build\webapp\WEB-INF\classes".
Content of this file: (this line is not in file)
#**********************************************************************
# Root log4j appender
log4j.rootCategory = INFO, root
log4j.appender.root = org.apache.log4j.FileAppender
log4j.appender.root.File = ../logs/my.log
log4j.appender.root.layout = org.apache.log4j.PatternLayout
log4j.appender.root.layout.ConversionPattern = %-5r %-5p [%t] %c{2} -
%m%n
log4j.appender.root.Append = false
# Apache JCS cache
log4j.category.org.apache.jcs = INFO, jcs
log4j.appender.jcs = org.apache.log4j.FileAppender
log4j.appender.jcs.File = ../logs/jcs.log
log4j.appender.jcs.layout = org.apache.log4j.PatternLayout
log4j.appender.jcs.layout.ConversionPattern = %-5r %-5p [%t] %c{2} -
%m%n
log4j.appender.jcs.Append = false
#**********************************************************************
End of file.(this line is not in file)
With this done an error message will not occure on cocoon startup.
Regards martin
>>> Nicolas BOUSSUGE <[EMAIL PROTECTED]> Mittwoch, 8.
November 2006 16:19 >>>
Hello,
I have 2 quick questions regargding Cocoon 2.1.9 and log4j configuration.
I must replace the logkit by log4j in my cocoon app. So I uncommented
the following settings in the web.xml :
<init-param>
<param-name>logger-class</param-name>
<param-value>org.apache.avalon.excalibur.logger.Log4JLoggerManager</param-value>
</init-param>
<init-param>
<param-name>log4j-config</param-name>
<param-value>/WEB-INF/log4j.xconf</param-value>
</init-para m>
As a consequence, I only get one log4j file, containing all logs.
How can I configure log4j so as to get the same categories as with the
logkit (sitemap, forms, handled-errors...) ?
Second point :
I get the following error at Cocoon startup :
log4j:WARN No appenders could be found for logger
(org.apache.catalina.startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.
What else needs to be configured ? Everything has to be in the
log4j.xconf file, or do I need additional config files ?
Thanks for your help.
Regards,
Nicolas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
-----------------------------------------------
Nicolas BOUSSUGE
Atos Origin - Agence Sud-Ouest
18 av de l escadrille Normandie-Niemen BP 20
31701 Blagnac Cedex
Bureau : 05.62.74.59.59
Télécopie: 05.62.74.59.00
mailto :[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]