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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply 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: 35248
    
    7
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.


Android appsImageJ pluginsJava web charts
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: 35248
    
    7
You need to pay attention to details - you mistyped the package name.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: how to create property file for log4j
 
Similar Threads
Help Please -log4j:WARN No appenders could be found for logger
where will be the log file??
how to define a path to save a log file in log4j
Log file created for every invocation
How to use log across objects