Jump to content
Excelsior Forums
Sign in to follow this  
spectdev

Problem with Log4j

Recommended Posts

Hi,

I have a problem with log4j.

My application was compiled with Jet 6.0.

The application works fine as a standalone Java application.

It seems like the application, once compiled with Jet 6, is not able to pick up the log4j.properties file.

The message I get is:

log4j:WARN No appenders could be found for logger (mypackage.MyClass).

log4j:WARN Please initialize the log4j system properly.

Setting the log4j.configuration system property to point to the log4j file does not help.

Doing "SET JETVMPROP=-Djet.stack.trace" is of no help either.

Please see into this issue.

Thanks.

Share this post


Link to post
Share on other sites

FYI,

I fixed my problem by doing this in my LogFactory class:

static {
        PropertyConfigurator.configure(System.getProperty(JavaSysEnvVariablesConstants.USER_DIR) + "/log4j.properties");
    }

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×