Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

invalid console appender config detected, console stream is looping

 
VijayKumar Tatikonda
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am deploying an WebObjects Application on JBoss, I am getting an Error
invalid console appender config detected, console stream is looping on the console
could any one help me in this issue.
Thanks in advance..
Regards
Vijay
 
Marco van Weverwijk
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We solved this problem by checking if Log4J is already configured before we configure it. In Jboss Log4J is already configured on startup. In Weblogic it's not...
// We check the system property:
String log4jConfig = System.getProperty("log4j.configuration");
// And our own properties file
String log4jFile = getInitParameter("log4j-init-file");
if (log4jConfig != null && log4jConfig.length() > 0) {
//Use Systems configuration( .... -Dlogj4.configuration=/path/to/log4j.*)
System.out.println("Log4J ConfigFile: " + log4jConfig);
configureLog4j(log4jConfig);
}
else if (log4jFile != null && log4jFile.length() > 0) {
//logj4.* from web.xml
System.out.println("Log4j file (from web.xml): " + configDirectory + log4jFile);
configureLog4j(configDirectory + log4jFile);
}
else {
//no log4j.configuration found
System.out.println("Using BaseConfigurator. Please specify the log4j.configuration in the System Properties");
BasicConfigurator.configure();
}
I think this will help...
Greatz,
Marco
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic