logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vivian, Nigel (N.)" <nvivi...@ford.com>
Subject log4j and WSAD
Date Mon, 07 Apr 2003 13:50:10 GMT
Hi all

sorry for this newbie post but how does one get log4j recognising its
properties file in Websphere Studio 4.0.3

I've got
...
   public static String defaultConfigurationFile = "log4j.properties";
...
   public static GlobalLogger getInstance(Class clazz){
	  cat = Category.getInstance(clazz);
	  PropertyConfigurator.configure(defaultConfigurationFile);

	  if (createdFlag == false){
		  log = new GlobalLogger();
		  createdFlag = true;
	  }
	  return log;
   }

in  GlobalLogger in my web app

and 
...
	static GlobalLogger log  =
GlobalLogger.getInstance("someclassname");
...

in my action class

the properties file is in webapp\WEB-INF\classes\log4j.properties

but I get
log4j:ERROR Could not read configuration file [log4j.properties].
java.io.FileNotFoundException: log4j.properties (The system cannot find the
file specified)
...
when I access the Action object

Not sure how to get the classes dir on the classpath I would assume that it
is automatically there as it is the target of the build output process

TIA
Nigel Vivian

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message