Return-Path: Mailing-List: contact log4j-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list log4j-user@jakarta.apache.org Received: (qmail 75448 invoked from network); 4 Mar 2001 21:22:23 -0000 Received: from unknown (HELO mail.qos.ch) (195.202.236.140) by h31.sny.collab.net with SMTP; 4 Mar 2001 21:22:23 -0000 Received: from gil.qos.ch (gil [192.168.1.2]) by mail.qos.ch (Postfix) with ESMTP id DF74C276CA for ; Sun, 4 Mar 2001 22:25:26 +0100 (CET) Message-Id: <5.0.2.1.0.20010304221940.02680f58@mail.qos.ch> X-Sender: cgu@mail.qos.ch X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Date: Sun, 04 Mar 2001 22:23:54 +0100 To: "LOG4J Users Mailing List" From: Ceki =?iso-8859-1?Q?G=FClc=FC?= Subject: Re: Turn off logging, and getHeader()/getFooter() in layout class In-Reply-To: <200103011649.f21GnTo25915@kelin.um.edu.mt> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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("\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