File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Log4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Log4j" Watch "Log4j" New topic


Raj kalaria
Ranch Hand

Joined: Sep 08, 2005
Posts: 72
hi can some one tell me what is log4j? how it is used ?
is it possible for any one to give one small example

any help would be appreciated

Scott Dunbar
Ranch Hand

Joined: Sep 23, 2004
Posts: 245
There is a new tool called "google" that lets you search the web for stuff. It's pretty powerful, you should try it. The first link it show you is the log4j home page which has descriptions and sample code.

<a href="" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
Raj kalaria
Ranch Hand

Joined: Sep 08, 2005
Posts: 72

yeh definately google is there, but i thought it would be good for me if some one who has used it and would share his knowledge thats why i thought to ask some help from gurus
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

I have used it. It works.

So after reading the log4j home page and the log4j manual, let us know if you have any specific questions.
j werner

Joined: Nov 18, 2005
Posts: 5
What if I just want to use the commons-logging simple logging? I couldn't find anything on google on how to enable this?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Commons logging is a wrapper around either log4j or java.util.logging.
It's goal is to make the two interchangable (pluggable) in an app.
It's not an actual logging package.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Log4j
It's not a secret anymore!