I don't use the xml configuration file so there may be more errors than
the ones I mention.  However, with that caveat...

You haven't spelt additivity correctly for one...

"<logger addivity="false" name="webapp.customtags">"

Also, you appear to have all of the appenders be ConsoleAppenders so it
would seem natural that they'd all be writing to the same place (the
console).  Perhaps you intend to be using RollingFileAppenders.

Finally, you need to use the fully qualified class name to make the
appenders work, so it's hard to imagine that this file would do anything
for you at all.

But, as I said, I don't use this format for my config file, so maybe I'm
wrong...

alan



-----Original Message-----
From: gfdgdf gdfgdf [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 12, 2004 1:47 AM
To: [EMAIL PROTECTED]
Subject: Logging every package with a different appender

Hi all log4j users !
I have a web application that uses several packages:
 
webapp.beans
webapp.servlets
webapp.customtags
 
Now I'd like to use a different appender for every package.
 
My log4j.xml file is basically like this:
 
<appender class="ConsoleAppender" name="CONSOLE">
  ......
</appender>
 
<appender class="ConsoleAppender" name="CONSOLEVERBOSE">
  ......
</appender>
 

<appender class="ConsoleAppender" name="FILE">
  ......
</appender>
 
<logger addivity="false" name="webapp.beans">
   <level value="INFO">
   <appender-ref ref="CONSOLE" />
</logger>
 
<logger addivity="false" name="webapp.servlets">
   <level value="INFO">
   <appender-ref ref="CONSOLEVERBOSE" />
</logger>
 
<logger addivity="false" name="webapp.customtags">
   <level value="INFO">
   <appender-ref ref="FILE" />
</logger>



 
<root>
  <appender-ref ref="CONSOLE" />
  <appender-ref ref="CONSOLEVERBOSE" />
  <appender-ref ref="FILE" />
</root>


 
 
Unfortunately I get in the FILE appender also logs from other
packages....can anybody point out what is wrong with it ?
Thanks a lot
Francesco

                
---------------------------------
Yahoo! Companion - Scarica gratis la toolbar di Ricerca di Yahoo!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to