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 Thilo Schottelius <Th...@impress.com> on 2001/05/17 09:07:47 UTC
RE: Hardcoding a default configuration
Hi Kai,
why don' t you use a simple "if statement":
private boolean configurationIsRead(){
//do your stuff
//config found
return (true);
}
if (configurationIsRead())
//everthing OK
else
//build up Categories and appenders
-----Original Message-----
From: Kai Compagner [mailto:kaicompagner@yahoo.com]
Sent: Donnerstag, 17. Mai 2001 20:52
To: log4j-user@jakarta.apache.org
Subject: Hardcoding a default configuration
Hi,
I am trying to setup Log4j so that it uses a default configuration that is
defined within my program if the log4j.properties file is not found. How
could this be done? Simply adding an appender from within my program gives
me every line twice if the properties file is picked up. I understand this
is a feature, but how do I avoid this?
thanks,
Kai
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org