You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Ashish Kulkarni <ku...@yahoo.com> on 2002/04/17 23:41:09 UTC

XML Configuration file

Hi,
I was trying to work with XML Configuration file, and
I have some questions regarding it
In my configuration file, any thing from package 
org.apache.log4j.xml.examples 
goes to log file A1.log,
and any log from a class outside this package goes to
console,
now i have a class which does not a package, but i
need the log's from this class to be written in say
B1.log file.
How can i do it????
I dont want to change <root> tag setting, but want to
add one more appender, and category
I need to do this because i am using taglib in JSP and
the output goes to STDOUT, since my jsp dont have any
package.
I have pasted my configuration file down here, 
(which is basically sample2.xml)
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="A1"
class="org.apache.log4j.FileAppender">
 <param name="File"   value="A1.log" />
 <param name="Append" value="false" />	      
 <layout class="org.apache.log4j.PatternLayout">
 <param name="ConversionPattern" value="%t %-5p %c{2}
- %m%n"/>
 </layout>	    
</appender>

<appender name="STDOUT"
class="org.apache.log4j.ConsoleAppender">
 <layout class="org.apache.log4j.PatternLayout">
  <param name="ConversionPattern" value="%d %-5p [%t]
%C{2} (%F:%L) - %m%n"/>
  </layout>		
</appender>

<category name="org.apache.log4j.xml.examples">
	  <priority value="debug" />
  	  <appender-ref ref="A1" />
</category>

<root>
   <priority value ="debug" />
   <appender-ref ref="STDOUT" />
</root>
	
</log4j:configuration>

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Performance of log4j

Posted by "Edward Q. Bridges" <eb...@teachscape.com>.
do us all a favor and quote what you're referring to.

thanks
--e--


On Thu, 18 Apr 2002 17:20:04 +0530, Sivakumar wrote:

> Hi ,
> 
> I read in log4j documentation..says that it slows down the performance
> of an application.
> Is there any way to improve the performance...
> 
> Thnaks and regards
> siva
> 
> 
> 
> 


--
Edward Q. Bridges
http://www.teachscape.com



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Performance of log4j

Posted by Sivakumar <si...@wipro.com>.
Hi ,

I read in log4j documentation..says that it slows down the performance
of an application.
Is there any way to improve the performance...

Thnaks and regards
siva