commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hope, Matthew" <Matthew.H...@capitalone.com>
Subject RE: [logging] setting log levels
Date Mon, 12 May 2003 18:50:02 GMT
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.

Mime
View raw message