Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 83795 invoked from network); 12 May 2003 18:50:39 -0000 Received: from out.capitalone.com (HELO kdcnt4ims01.kdc.capitalone.com) (199.244.214.30) by daedalus.apache.org with SMTP; 12 May 2003 18:50:39 -0000 Received: by KDCNT4IMS01 with Internet Mail Service (5.5.2653.19) id ; Mon, 12 May 2003 14:50:03 -0400 Message-ID: <73E71EF16978D51197180002A56022D20743C558@ngmnt4mbx03.uk.capitalone.com> From: "Hope, Matthew" To: 'Jakarta Commons Users List' Subject: RE: [logging] setting log levels Date: Mon, 12 May 2003 14:50:02 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Unless they have a bloody good reason for wanting to use command line arguments convince them not to - the effort is not well spent as it restricts what is achievable and adds unnecessary maintenance. Your customer would appear to fail to understand the configurability afforded through JDK1/4 logging, Log4j et al. Configuration of the underlying Logging implementation is not in the scope of commons logging. Which is why there is no obvious way to achieve that which you speak. You could have you main method set up the underlying implementation directly (Log4j allows this pretty simply as I think does JDK1.4 logging) Then at least your logging dependancy is kept to one class... Alternatively show them how to pass command line arguments as jvm system properties In the properties file log4j.appender.myAppender.File=${logging.file} Then command line java -Dlogging.file=logfile.txt myApp Matt -----Original Message----- From: Sigler, John [mailto:John.Sigler@sabre.com] Sent: 12 May 2003 18:59 To: commons-user@jakarta.apache.org Subject: [logging] setting log levels We have a customer requirement to allow the logging level and output log filename to be overridden via the command line (i.e., run "foo -l logfile.txt -mode debug") as well as set via an external file. Looking through the logging API I don't see a way to do either. Is it possible? john sigler --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org ************************************************************************** The information transmitted herewith is sensitive information intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.