aspose file tools*
The moose likes Other Open Source Projects and the fly likes how to create property file for log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "how to create property file for log4j" Watch "how to create property file for log4j" New topic
Author

how to create property file for log4j

bharani rao
Ranch Hand

Joined: Apr 06, 2009
Posts: 164
hi,

I was advised to have a property file for this program...

import org.apache.log4j.*;
public class SimpleLogging {
/** Creates a new instance of SimpleLogging */
public SimpleLogging() {
}

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Logger logger =Logger.getLogger("log.logg");
logger.info("Hello this is an info message");
}
}

how to create it and the steps for it....
explain in detail...

hope I'm in the correct forum this time


thanks in advance
bharani rao
Ranch Hand

Joined: Apr 06, 2009
Posts: 164
please anybody
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42648
    
  65
Did you read the links in the http://faq.javaranch.com/java/OtherOpenSourceProjectsFaq page that was pointed out to you? If not, you should do that first. Those explain the basic log4j setup.


Ping & DNS - my free Android networking tools app
bharani rao
Ranch Hand

Joined: Apr 06, 2009
Posts: 164
@ above,

i have gone through the link you have provided.
i followed the steps in it.
I'm getting the error

package org.Apache.log4j does not exist

i have downloaded the Apache 1.2.15, unzipped it. copied the log4j1.2.15 to my lib Dir in the java folder..
what else should i do
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42648
    
  65
You need to pay attention to details - you mistyped the package name.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to create property file for log4j