• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Log 4j config issue

 
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a standalone application developed in Eclipse. Application is using log4j. Logs are genrating fine when I am running it from eclipse.

When I try to run the main class through command prompt, I am getting the error "log4j:WARN No appenders could be found for logger"

I have put the log4j.properties file in classpath also.

It is not giving error for the main class file, it gives the name of the class called with in the main class.

for example -

Class A{
static Logger log = Logger.getLogger(A.class);
B b = new B();
}

Class A{
static Logger log = Logger.getLogger(B.class);
}

log4j:WARN No appenders could be found for logger (B).
log4j:WARN Please initialize the log4j system properly.

Please provide some pointers.
 
reply
    Bookmark Topic Watch Topic
  • New Topic