The PropertyConfigurator.configure(filename) expects an absolute filename path.
How about changing this piece of code:
"ashok.kadam" wrote :
|
| |
| | /**
| | * Default BaseLogger Constructor.
| | */
| | private BaseLogger() {
| | PropertyConfigurator.configure("log4j.properties");
| | logLevel = DEFAULT_LOGLEVEL;
| | }
| |
| |
to:
| private BaseLogger() {
| Properties props = new Properties();
|
| //load from classpath
| InputStream inputStream =
this.getClass().getClassLoader().getResourceAsStream("log4j.properties");
| props.load(inputStream);
|
| // Now pass these properties to PropertyConfigurator
| PropertyConfigurator.configure(props);
|
| logLevel = DEFAULT_LOGLEVEL;
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175092#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...