aspose file tools*
The moose likes Java in General and the fly likes Information regarding log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Information regarding log4j" Watch "Information regarding log4j" New topic
Author

Information regarding log4j

Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 577

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.


Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
Sadanand Murthy
Ranch Hand

Joined: Nov 26, 2003
Posts: 382
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


Ever Existing, Ever Conscious, Ever-new Bliss
Blake Minghelli
Ranch Hand

Joined: Sep 13, 2002
Posts: 331
You may also want to search the "Other Open Source Projects" forum here on JavaRanch


Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 577

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

Joined: Feb 03, 2004
Posts: 577

Where can I get log4j.jar files in the site?
Naren.
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 577

Ok, I got all the things I want.
Naren.
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 577

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

Joined: Oct 29, 2001
Posts: 8971
    
    9

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. . .


[How To Ask Questions On JavaRanch]
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 577

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

Joined: Feb 03, 2004
Posts: 577

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.
 
 
subject: Information regarding log4j