Re: Log4J and Tomcat 5.5 - Trouble getting started

2007-03-06 Thread Jacob Kjome
At 05:29 PM 3/6/2007, you wrote: >You cannot log or add any other statement outside of a method. You will >have to learn some more Java ;-) > I just looked back at his example. Indeed, it's not within a method. I guess I just took for granted that logging was being done inside a method becaus

Re: Log4J and Tomcat 5.5 - Trouble getting started

2007-03-06 Thread Sebastian Hennebrueder
You cannot log or add any other statement outside of a method. You will have to learn some more Java ;-) Regards Sebastian Chris Chappell schrieb: > Hi > > thanks to Jacob for the reply and tips. > > I have found that I can use logger.error("etc") as long as it is > nested in a catch statement. >

Re: Log4J and Tomcat 5.5 - Trouble getting started

2007-03-06 Thread Jacob Kjome
Quoting Chris Chappell <[EMAIL PROTECTED]>: > Hi > > thanks to Jacob for the reply and tips. > > I have found that I can use logger.error("etc") as long as it is nested in a > catch statement. > If in "straight code" eclipse shows the error. > I am not sure why this might be - examples on the net

Re: Log4J and Tomcat 5.5 - Trouble getting started

2007-03-06 Thread Chris Chappell
Hi thanks to Jacob for the reply and tips. I have found that I can use logger.error("etc") as long as it is nested in a catch statement. If in "straight code" eclipse shows the error. I am not sure why this might be - examples on the net show that it should be poss. However I only need to sh

Re: log4J MDC

2007-03-06 Thread James Stauffer
According to the javadocs there isn't a way to print everything. You must list every key. On 3/6/07, Asif Mekrani <[EMAIL PROTECTED]> wrote: Hi All, How can i print all the parameter in the MDC. I try some thing like this in my log4J file: %X{parameterKey} and this gets print. but, when i wan

Re: usage of log4j api

2007-03-06 Thread James Stauffer
activateOptions() On 3/6/07, erdem boz <[EMAIL PROTECTED]> wrote: Thanks for quick reply. Do you have any example code? On 3/5/07, James Stauffer <[EMAIL PROTECTED]> wrote: > > There might be a call needed to initialize the appender. > > On 3/5/07, erdem boz <[EMAIL PROTECTED]> wrote: > > Hello

log4J MDC

2007-03-06 Thread Asif Mekrani
Hi All, How can i print all the parameter in the MDC. I try some thing like this in my log4J file: %X{parameterKey} and this gets print. but, when i want to print more than one parameter how should it. can some body tell me the syntax. Thanks in advance. Smiles, Asif