File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes Problem initializing log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Problem initializing log4j" Watch "Problem initializing log4j" New topic

Problem initializing log4j

Jan Hoppmann
Ranch Hand

Joined: Jul 19, 2010
Posts: 147

I have the problem that I get the following output:
log4j:WARN No appenders could be found for logger (com.sivis.util.cli.MockBackend).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See for more info.

My log4j.xml looks like this:

log4j.xml has been added to the classpath. It's my first time working with log4j, and I have no clue what might be wrong here

Life is full of choices. Sometimes you make the good ones, and sometimes you have to kill all the witnesses.
David Newton

Joined: Sep 29, 2008
Posts: 12617

There's likely nothing wrong. Is your logging working?
Jan Hoppmann
Ranch Hand

Joined: Jul 19, 2010
Posts: 147

Unfortunately, it isn't. I try logging with this:

and all I get is this error message. MockBackend looks like this:

I agree. Here's the link:
subject: Problem initializing log4j
It's not a secret anymore!