logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <...@qos.ch>
Subject Re: Turn off logging, and getHeader()/getFooter() in layout class
Date Sun, 04 Mar 2001 21:23:54 GMT
At 17:49 01.03.2001 +0100, jebe002@um.edu.mt wrote:


>Hi all, and good evening ceki (you will probably be the only one to answer 
>this),
>
>I am using log4j and it meets almost all my requirements.  However I have two 
>questions
>
>(1) How do I turn all logging off from the CONFIG file ?  What do I need to set 
>?  If the user does not want to log anything how should he configure the config 
>file ?  

JP,

This is from the 1.1beta1 HISTORY file:

 - Logging can now be disabled per Hierarchy. It can also be disabled
   using configuration files using the "disable" directive.  The
   disableOverride directive takes precedence over the disable
   directive.  As a result of this change the disable family of
   methods has moved from the BasicConfigurator class to the Hierarchy
   class. [**]

>(2) I have created my own layout class (to output in xml) and I would like to 
>set an appropriate xml header (I subclasses layout and overridden the 
>getHeader() method)
>
>public String getHeader() {
>  
>    StringBuffer buf = new StringBuffer();
>    
>    buf.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
>     
>    return buf.toString();
>  }
>
>while everything in the layout is ok, this header never appears anywhere in the 
>log file.  The same can be said if you try to set a footer.  Why ?  (I am using 
>fileappender)...


This is a bug/omission that was fixed in 1.1b1. Hope this helps, Ceki 



Mime
View raw message