Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

configure log4j in netbeans

 
a kishore
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Does anyone know how to configure log4j in netbeans?

Please let me know the process and the files needed for that

thanks alot,
kishore
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you wanting to get log information from NetBeans itself, or are you wanting to know how to use log4j within your app which you are using NetBeans to write?
 
a kishore
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter, thank you for replying.

Right now im not sure which one is better. because so far i didnt use either of it. If you tell me which one is better and whats is the difference between them, i will use that. I prefer to be simple and easy, so that i can remember those steps and do that again after some time.

thank you alot,
kishore
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry, but if you don't know what your requirements are, how am I supposed to help you?

What is it that you want to log? What are you trying to do?
 
a kishore
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter,

Im developing one web application in netbeans6.5 and Im new to this IDE, Im using struts1.2.9 to do that application. So i want to use log4j to check errors and messages but currently im using only System.out.println(). Can you please tell me how to configure? If my question is not clear please let me know. I will explain more.

Thank you in advance,
kishore
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, so you want to add logging to your app. The best place to start is the Log4J documentation: http://logging.apache.org/log4j/1.2/manual.html

To keep NetBeans happy you should add the loj4j.jar file to your project.
 
a kishore
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got it. thank you for your advice
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic