• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Information regarding log4j

 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm new to advanced programming and I would like to get more info about log4j. I mean info about Where I can get tutorial of it? How it's useful for us? In what way it is useful? where can we use this in programming? Kindly give detailed information.
Regards,
Naren.
 
Sadanand Murthy
Ranch Hand
Posts: 382
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Naren Chivukula:
Hi,
I'm new to advanced programming and I would like to get more info about log4j. I mean info about Where I can get tutorial of it? How it's useful for us? In what way it is useful? where can we use this in programming? Kindly give detailed information.
Regards,
Naren.

A quick google search & voila: http://logging.apache.org/log4j/docs/documentation.html
 
Blake Minghelli
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may also want to search the "Other Open Source Projects" forum here on JavaRanch
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the site and I'm going thru it. But I'd like to know the basic usage of log4j. Where exactly I can get in that site and which is the better one to download?
Naren.
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where can I get log4j.jar files in the site?
Naren.
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I got all the things I want.
Naren.
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Now I understand what is log4j and it's purpose. But, I do want to know the application of it with our conventional java program. How I get simple examples where log4j is used in our java program. I BADLY NEED THESE EXAMPLES. Kindly oblige me.
Regards,
Narendranath.
 
Joe Ess
Bartender
Posts: 9319
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Naren Chivukula:
I BADLY NEED THESE EXAMPLES.

Easy there, big fella. There's plenty of examples in the documentation (you did read the documentation Sadanand linked to, right?). You just use a log statement where you would otherwise use a System.out.println() for debug purposes. log4j gives you two big benefits over System.out.println():
1. it is easy to send the logging info to files, servers, database or whatnot, depending on how you want to store/search your log information.
2. you don't have to remove the statements when you deploy your application. You use the log level (i.e. DEBUG, INFO, WARN, ERROR and FATAL), to control the level of output. You can set the log level to any of the 5 and the specified log level and every one above it will get printed out (i.e. set the log level to WARN and WARN, ERROR and FATAL get printed out). Obviously you should have a lot more DEBUG statements (i.e. whenever your user presses a button) than ERROR (i.e. whenever an exception occurs).
There really isn't much more to it. . .
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot Joe. Finally I'm satisfied with your reply.
Thanks Sadanand.
May I know where which chat rooms are intended for programming languages?
I'd like to get solutions right at the moment I pose.
Regards,
Naren.
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May I know where which chat rooms are intended for programming languages?
I'd like to get solutions right at the moment I pose.
Regards,
Naren.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic