It must be the only log4j.xml file in the web app's classpath - usually that
means in $context/WEB-INF/classes

You could run your container with the option "-Dlog4j.debug" to see what
configuration is being loaded.

On 2/14/06, Praveen Kumar Hasthalapuram <[EMAIL PROTECTED]> wrote:
>
> I have only one log4j.xml file and how can we ensure that it is loaded?
>
> In the GUI means, accessing the appliction thru IE,
> and when we do some operations (like updating data, deleting data or
> scheduling) in any module,
> (say module1) we are logging the what type of operation is running at
> particular time in that module.
>
> Just for testing purpose, i wrote one class to test at command prompt,it
> is
> working here.
>
> Thanks,
> -- Praveen
>
> On 2/14/06, Bender Heri <[EMAIL PROTECTED]> wrote:
> >
> > Are you shure your correct xml configuration is loaded in your GUI(web)
> > app? BTW what you mean with "GUI(web)" exactly?
> >
> > Heri
> >
> > > -----Original Message-----
> > > From: Praveen Kumar Hasthalapuram [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, February 14, 2006 2:38 PM
> > > To: [email protected]
> > > Subject: Filtering messages with Log4j.xml
> > >
> > >
> > > Hi,
> > >
> > > I am facing a issue with log4j.xml.
> > >
> > > I have configured filters in xml file as given below:
> > > Messages are filtered and logged into specified log file when
> > > i run from
> > > command prompt.
> > > i.e. i wrote a sample java file which will log messages.
> > > but when i ran in GUI(web) messages are not getting filtered
> > > and logged.
> > >
> > >     <appender name="FA" class="org.apache.log4j.RollingFileAppender">
> > >         <param name="File" value="logs/sample.log"/>
> > >         <param name="Append" value="true"/>
> > >         <param name="MaxFileSize" value="10000KB"/>
> > >         <param name="MaxBackupIndex" value="2"/>
> > >         <layout class="org.apache.log4j.PatternLayout">
> > >             <param name="ConversionPattern"
> > > value="%d{yyyy-MM-dd HH:mm:ss}
> > > &lt;fsp&gt;%p %m%n"/>
> > >         </layout>
> > >
> > >    <filter
> > > class="com.cisco.nettools.logger.filters.StringMatchFilter">
> > >      <param name="stringToMatch" value="Device"/>
> > >      <param name="matchReturnValue" value="accept"/>
> > >      <param name="noMatchReturnValue" value="deny"/>
> > >      <param name="cantMatchReturnValue" value="neutral"/>
> > >    </filter>
> > >
> > >   <filter class="com.cisco.nettools.logger.filters.StringMatchFilter">
> > >      <param name="stringToMatch" value="PING"/>
> > >      <param name="matchReturnValue" value="accept"/>
> > >      <param name="noMatchReturnValue" value="deny"/>
> > >      <param name="cantMatchReturnValue" value="neutral"/>
> > >    </filter>
> > >
> > >       <filter class="org.apache.log4j.varia.DenyAllFilter"/>
> > >     </appender>
> > >
> > >  What could be the problem?
> > >
> > > Thanks,
> > > Praveen
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>


--
Javier González Nicolini

Reply via email to