At 08:39 AM 12/30/2005 +1100, you wrote:
>
>Hi Jacob,
>
>Thank you for the information.
>
>Actually, my logging works most of the time.  I think  it is not working
>for the
>deep level calls stack.
>
>More preceisly,
>
>Let say  following is the call stack  structure
>
>a.ma() ->  b.mb()    ->  c.mc() ->  d.md() ->e.me();
>
>
>I can  see the logs from  ma(), mb(), mc() and md() but not in  me().
>I  know that me() is executed because otherwise my application  wouldn't
> work. It is just I can't see logs after certain level. Is there such
>setting in log4j ?
>

Ok, that makes more sense. No, I'm not aware of any limitation. In fact, Log4j wouldn't know what your "call" stack would be. It would just match up the current Logger name being used to log at whatever Level to see what appender, if any, it should be applied to. How are your loggers named? All by FQCN or something else? Try setting the ROOT logger to log to the debug level with the appender of your choice. This should capture any and all logging. If you still don't see your logging, I bet that your configuration is being defined by a file other than the one you are expecting. At this point, go back to my original suggestion of using log4j.xml rather than log4j.properties and putting log4j.xml in WEB-INF/classes and log4j.jar in WEB-INF/lib. Then try again. You should see *all* logging at this point.

Jake

>
>Thank you very much.
>
>Hakan
>
>
>
>
>
>
>
>Jacob Kjome <[EMAIL PROTECTED]>
>30/12/2005 03:07 AM
>Please respond to
>"Log4J Users List" <[email protected]>
>
>
>To
>"Log4J Users List" <[email protected]>
>cc
>
>Subject
>Re: Tomcat  log4j logging
>
>
>
>
>
>
>At 01:48 PM 12/29/2005 +1100, you wrote:
> >
> >Hi everyone,
> >
> >I am using  log4j under Tomcat  5.0  with log4j.properties file.
> >When I  perform unit test outside of Tomcat I can see   log from
> >some  deep  level  of call stack. However, it isn't the case when
> >I use  the same components  inside Tomcat. It looks like Tomcat
> >filters out  the logs coming from the deep level of call stack.
> >I  ran Tomcat in console mode to see the  standard output from
> >that deep level calls.  I cannot see the standard output  calls ( only
> >the deep level calls ) either.
> >
> >Is there a way to  change this behaviour ?
> >
>
>Do you have log4j.jar in WEB-INF/lib?  If not, do that.  Also, are there
>any cases of a log4j.xml in the classpath (default package, maybe hidden
>inside a jar, in the app or server)?  Log4j's default initialization (in a
>
>static block of LogManager) loads log4j.xml in preference to
>log4j.properties.  It is possible that you are picking up some other
>configuration, which might explain why you don't see the logging you
>expect.  Of course, if you don't have log4j.jar in WEB-INF/lib, then you
>are almost certainly not using the configuration you expect because log4j
>would have already been configured at the server level (if log4j.jar
>exists
>there, which it must if you didn't include it in WEB-INF/lib).
>
>Anyway, try those suggestions out and see if it solves your problem.  I
>suggest you simply move to an XML config file, both to guarantee that you
>pick of the configuration that you expect and to gain some extra
>configuration possibilities because there is some stuff that isn't
>supported by properties files that is supported by XML config files.
>
>Jake
>
> >
> >Thanks
> >
> >
> >Hakan
> >
> >
> >This email may contain privileged/confidential information. You may not
>copy
> >or disclose this email to anyone without the written permission of the
> >sender.  If you have received this email in error please kindly delete
>this
> >message and notify the sender.  Opinions expressed in this email are
>those
> >of the sender and not necessarily the opinions of the employer.
> >
> >This email and any attached files should be scanned to detect viruses.
>No
> >liability will be accepted by the employer for loss or damage (whether
> >caused by negligence or not) as a result of email transmission.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>This email may contain privileged/confidential information. You may not copy
>or disclose this email to anyone without the written permission of the
>sender.  If you have received this email in error please kindly delete this
>message and notify the sender.  Opinions expressed in this email are those
>of the sender and not necessarily the opinions of the employer.
>
>This email and any attached files should be scanned to detect viruses.  No
>liability will be accepted by the employer for loss or damage (whether
>caused by negligence or not) as a result of email transmission.


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

Reply via email to