Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to create property file for log4j

 
bharani rao
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please anybody
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
bharani rao
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ 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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to pay attention to details - you mistyped the package name.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic