thanks,
but the question is why do we need log4jservlet. why do we code it?

Regards,
Abhimanyu Koul
FinEng Solutions (P)  Ltd.
Mobile : +91 9819510090
----- Original Message -----
From: "abdurrahman sahin" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <user@struts.apache.org>
Sent: Wednesday, June 14, 2006 11:49 AM
Subject: RE: log4j - urgent


> hi;
> i think u don't need such a specific "log4jservlet" servlet. you can use
any
> servlet to initialize log4j
>
> here is a filter to init logger, you will need a logger property file in
> that case.
>
> public void doFilter( ServletRequest servletRequest, ServletResponse
> servletResponse, FilterChain filterChain ) throws IOException,
> ServletException {
>     if (isInitialized)  {
> filterChain.doFilter(servletRequest, servletResponse);
> return;
>     }
>
> String file = _filterConfig.getInitParameter ("log4j-init-file");
>
>
>     if(file != null) {
>     File f = new File(file);
> if (f.exists()) {
>     if (s_logger.isInfoEnabled()) {
>     s_logger.info("Reading logger property "+file);
>     }
> PropertyConfigurator.configure(file);
> }
> ............
>
>
> -----Original Message-----
> From: Abhimanyu Koul [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 14, 2006 9:12 AM
> To: Struts Mailing list
> Subject: log4j - urgent
>
>
> 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to