Hi Koul,

If you wanna simply use log4j in Struts application. You can just import
log4j and create a Logger instance in your source files, something like:

import org.apache.log4j.Logger;
....

Logger logger = Logger.getLogger(YourClassName.class);

...

Then you can just use logger to log your information, something like:
...
logger.debug("debug");
logger.info("info");
...
Application servers also use log4j such as Tomcat, JBoss. You can configure
log4j for server log as well ....

Wish it helps

On 6/14/06, Abhimanyu Koul <[EMAIL PROTECTED]> wrote:

hi all!
i am using log4j in my application but am a bit confused about it. what r
the steps to use log4j in my application.
why do we need to create log4jservlet class in the application.
is it necessary? if no, why do we create it?
also, how does logfactory get to know that we are using log4j in the
application
thanks

Regards,
Abhimanyu Koul
FinEng Solutions (P)  Ltd.
Mobile : +91 9819510090




--
=====================================
The world will be ended if love is everywhere.
                                              ---- Shawzi

Reply via email to