Re: I am not getting stack trace from logger.error(error,e)?

2003-12-08 Thread struts
I am also getting the similiar problem. Just I was able to see the stack
trace in the console, but in the database, I can just see the error message
without stack trace. Attached is my log4j.xml file. Anybody knows why?

Thanks.

Song

Robert Augustyn [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Paul,
 Thanks, I am running 1.4.2 vm and it does not look
 like it's fixed...
 It is real pain!.
 robert

 -Original Message-
 From: Paul Smith [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 27, 2003 7:02 PM
 To: Log4J Users List
 Subject: RE: I am not getting stack trace from
 logger.error(error,e)?


 On Fri, 2003-11-28 at 10:45, Robert Augustyn wrote:

  Hi Ceki,

  I am getting just one line like:

  Java.NullPointerException:



 This maybe only a very slight possibility, but I have
 seen exactly what

 you are describing in our production environment when
 we are using the

 -server option under the Sun 1.4.2 JDK under Linux (no
 JBoss though).

 Just a single line with no more information.



 See this bug:

 http://developer.java.sun.com/developer/bugParade/bugs/4761344.html



 They say it is fixed in 1.4.2, and while it does not
 happen with the

 frequency it used to, it's one to look out for.  Not
 using the -server

 option seems to help, although you lose some
 performance there.



 cheers,



 Paul Smith





 -

 To unsubscribe, e-mail:
 [EMAIL PROTECTED]

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




 __
 Do you Yahoo!?
 Free Pop-Up Blocker - Get it now
 http://companion.yahoo.com/


begin 666 log4j.xml
M/#]X;[EMAIL PROTECTED]VEO;CTB,2XP(B!E;F-O9EN9STB551[EMAIL PROTECTED]/SX-CPA1$]#
M5%E012!L;VT:CIC;VYF:6=UF%T:6]N(%-94U1%32 B;]G-HN9'1D(CX-
MCQL;VT:CIC;VYF:6=UF%T:6]N('AM;YS.FQO9S1J/2)H='1P.B\O:F%K
M87)T82YA%C:4N;W)G+VQO9S1J+R(@95B=6](F9A;'-E(CX-@T*( \
M87!P96YD97(@;F%M93TB1DE,12(@8VQAW,](F]R9RYJ8F]SRYL;V=G:6YG
M+F%P5N95R+D1A:6QY4F]L;EN9T9I;5!'!E;F1EB(^#0H@( @/'!A
MF%M(YA;64](E1HF5S:]L9(@=F%L=64](D524D]2(B\^#0H@( @/'!A
MF%M(YA;64](D9I;4B('9A;'5E/2(DVIB;W-S+G-EG9EBYH;VUE+F1I
MGTO;]G+W-EG9EBYL;VB+SX-B @( \%R86T@;F%M93TB07!P96YD
M(B!V86QU93TB=')U92(O/@T*( @(#QP87)A;2!N86UE/2)$871E4%T=5R
M;B(@=F%L=64](BN)WEY7DM34TM90B+SX-B @( \;%Y;W5T(-L87-S
M/2)OFN87!A8VAE+FQO9S1J+E!A='1EFY,87EO=70B/@T*( @( @/'!A
MF%M(YA;64](D-O;G9EG-I;VY0871T97)N(B!V86QU93TB)60@)2TU!;
M)6-=(5M)6XB+SX-B @( \+VQA6]U=#X)( @( T*( \+V%P5N95R
M/@T*( )#0H@( @/%P5N95R(YA;64](DI$0D,B(-L87-S/2)C;VTN
M='5M8FQE=V5E9YM97-S96YG97(N;]G9VEN9RY-97-S96YG97)*1$)#07!P
M96YD97(B/@T*( @(#QP87)A;2!N86UE/2)4:')EVAO;0B('9A;'5E/2)%
M4E)/4B(O/@T*( @(#QP87)A;2!N86UE/2)S6PB( T*( @( @(!V86QU
M93TB:6YS97)T(EN=[EMAIL PROTECTED];G1,;V=%=F5N=',@* T*( @( @( @( @
M( @( @( @( @( @( @( @( @( @( @(!E=F5N=%1Y4L0D)
M0D)0D)0T*( @( @( @( @( @( @( @( @( @( @( @( @
M( @( @(!E=F5N=$UA8VAI;F4L#0H@( @( @( @( @( @( @( @
M( @( @( @( @( @( @( @(5V96YT5[EMAIL PROTECTED]@( @( @( @
M( @( @( @( @( @( @( @( @( @( @( @(5V96YT240L( T*
M( @( @( @( @( @( @( @( @( @( @( @( @( @( @(!E
M=F5N=$QE=F5L+ D-B @( @( @( @( @( @( @( @( @( @( @
M( @( @( @( @979E;G1#871E9V]R2P-B @( @( @( @( @( @
M( @( @( @( @( @( @( @( @( @8V]M]N96YT3F%M92P-B @
M( @( @( @( @( @( @( @( @( @( @( @( @( @( @979E
M;G1#;%STE$+ T*( @( @( @( @( @( @( @( @( @( @( @
M( @( @( @(!E=F5N=$-L87-S15S8W)I'1I;VXL( T*( @( @( @
M( @( @( @( @( @( @( @( @( @( @( @(!E=F5N=$1E=%I
M;',-B @( @( @( @( @( @( @( @( @( @( @( @( @( @
M( I#0H@( @( @( @( @( @( @( @( @( @( @( @(!V86QU
M97,@* -B @( @( @( @( @( @( @( @( @( @( @( @( @
M( @( @)7 L( T*( @( @( @( @( @( @( @( @( @( @( @
M( @( @( @( C5$]+14Y?159%3E1?34%#2$E.15].04U%([EMAIL PROTECTED]@( @
M( @( @( @( @( @( @( @( @( @( @( @( @( @(,E9'M-
M32]D9]Y7EY($A(.FUM.G-S?2,L( T*( @( @( @( @( @( @( @
M( @( @( @( @( @( @( @( C)6,C+ -B @( @( @( @( @
M( @( @( @( @( @( @( @( @( @( @,[EMAIL PROTECTED]@( @( @( @
M( @( @( @( @( @( @( @( @( @( @( @(#DL#0H@( @( @
M( @( @( @( @( @( @( @( @( @( @( @( @(-396-UF4@
M365SV%G92!2961IF5C=,L#0H@( @( @( @( @( @( @( @( @
M( @( @( @( @( @( @(#$V,# P+ T*( @( @( @( @( @( @
M( @( @( @( @( @( @( @( @( C6R5C72,L#0H@( @( @( @
M( @( @( @( @( @( @( @( @( @( @( @(-;)6-[,7U=(4N
M,S P;2,-B @( @( @( @( @( @( @( @( @( @( @( @( @
M( @( @*0T*0D-B @( B+SX-B @/]A'!E;F1ECX-@T*( @/$M
M+2 ]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/[EMAIL PROTECTED]@( \(2TM
M($%P5N9!M97-S86=ER!T;R!T:[EMAIL PROTECTED]V]L92 M+3X-B @(#PA+2T@
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T](TM/@T*#0H@( \87!P
M96YD97(@;F%M93TB0T].4T],12(@8VQAW,](F]R9RYA%C:4N;]G-HN
M0V]NV]L94%P5N95R(CX-B @( @(#QEG)ODAA;F1L97(@8VQAW,]
M(F]R9RYJ8F]SRYL;V=G:6YG+G5T:6PN3VYL4]N8V5%G)ODAA;F1L97(B
M+SX-B @( @(#QP87)A;2!N86UE/2)487)G970B('9A;'5E/2)37-T96TN
M;W5T(B\^#0H@( @( \%R86T@;F%M93TB5AR97-H;VQD(B!V86QU93TB
M24Y3R(O/@T*#0H@( @( \;%Y;W5T(-L87-S/2)OFN87!A8VAE+FQO
M9S1J+E!A='1EFY,87EO=70B/@T*( @( @( @/$M+2!4:[EMAIL PROTECTED]5F875L
M=!P871T97)N.B!$871E(%!R:6]R:71Y(%M#871E9V]R[EMAIL PROTECTED]V%G95QN
M(TM/@T*( @( @( @/'!AF

Re: I am not getting stack trace from logger.error(error,e)?

2003-12-08 Thread Paul Smith
Depends how you log your stacktrace.  If you log like this:

private static final Logger LOG = Logger.getLogger(.);

...
try {

}
catch(Exception e) {
  LOG.error(e);
}

Then you WILL only get the error message without the rest of the stack
trace.  The reason is that the exception is going to the
loggers.error(Object) method, and Log4j is simply calling the
.toString() on the Exception object.

This is a common mistake, and I've forgotten this several times myself. 

What you really need to do is:

LOG.error(An error happened here, e);

This will ensure that the full stacktrace is output (assuming that the
JDK 1.4.2 doesn't still get you)

cheers,

Paul Smith

On Tue, 2003-12-09 at 07:23, struts wrote:
 I am also getting the similiar problem. Just I was able to see the stack
 trace in the console, but in the database, I can just see the error message
 without stack trace. Attached is my log4j.xml file. Anybody knows why?
 
 Thanks.
 
 Song
 
 Robert Augustyn [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Paul,
  Thanks, I am running 1.4.2 vm and it does not look
  like it's fixed...
  It is real pain!.
  robert
 
  -Original Message-
  From: Paul Smith [mailto:[EMAIL PROTECTED]
  Sent: Thursday, November 27, 2003 7:02 PM
  To: Log4J Users List
  Subject: RE: I am not getting stack trace from
  logger.error(error,e)?
 
 
  On Fri, 2003-11-28 at 10:45, Robert Augustyn wrote:
 
   Hi Ceki,
 
   I am getting just one line like:
 
   Java.NullPointerException:
 
 
 
  This maybe only a very slight possibility, but I have
  seen exactly what
 
  you are describing in our production environment when
  we are using the
 
  -server option under the Sun 1.4.2 JDK under Linux (no
  JBoss though).
 
  Just a single line with no more information.
 
 
 
  See this bug:
 
  http://developer.java.sun.com/developer/bugParade/bugs/4761344.html
 
 
 
  They say it is fixed in 1.4.2, and while it does not
  happen with the
 
  frequency it used to, it's one to look out for.  Not
  using the -server
 
  option seems to help, although you lose some
  performance there.
 
 
 
  cheers,
 
 
 
  Paul Smith
 
 
 
 
 
  -
 
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
 
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 
 
 
 
  __
  Do you Yahoo!?
  Free Pop-Up Blocker - Get it now
  http://companion.yahoo.com/
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 begin 600 log4j.xml
 M/#]X;[EMAIL PROTECTED]VEO;CTB,2XP(B!E;F-O9EN9STB551[EMAIL PROTECTED]/SX-CPA1$]#
 M5%E012!L;VT:CIC;VYF:6=UF%T:6]N(%-94U1%32`B;]G-HN9'1D(CX-
 MCQL;VT:CIC;VYF:6=UF%T:6]N('AM;YS.FQO9S1J/2)H='1P.B\O:F%K
 M87)T82YA%C:4N;W)G+VQO9S1J+R(@95B=6](F9A;'-E(CX-@T*(`\
 M87!P96YD97(@;F%M93TB1DE,12(@8VQAW,](F]R9RYJ8F]SRYL;V=G:6YG
 M+F%P5N95R+D1A:6QY4F]L;EN9T9I;5!'!E;F1EB(^#0H@(`@/'!A
 MF%M(YA;64](E1HF5S:]L9(@=F%L=64](D524D]2(B\^#0H@(`@/'!A
 MF%M(YA;64](D9I;4B('9A;'5E/2(DVIB;W-S+G-EG9EBYH;VUE+F1I
 MGTO;]G+W-EG9EBYL;VB+SX-B`@(`\%R86T@;F%M93TB07!P96YD
 M(B!V86QU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`@(`@([EMAIL PROTECTED]
 M;G1#;%STE$+`T*(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@
 M(`@(`@(`@(!E=F5N=$-L87-S15S8W)I'1I;VXL(`T*(`@(`@(`@
 M(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(!E=F5N=$1E=%I
 M;',-B`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@
 M(`I#0H@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(!V86QU
 M97,@*`-B`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@
 M(`@(`@)7`L(`T*(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@
 M(`@(`@(`@(`C5$]+14Y?159%3E1?34%#2$E.15].04U%([EMAIL PROTECTED]@(`@
 M(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(,E9'M-
 M32]D9]Y7EY($A(.FUM.G-S?2,L(`T*(`@(`@(`@(`@(`@(`@(`@
 M(`@(`@(`@(`@(`@(`@(`@(`C)6,C+`-B`@(`@(`@(`@(`@
 M(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@,[EMAIL PROTECTED]@(`@(`@(`@
 M

Re: I am not getting stack trace from logger.error(error,e)?

2003-12-08 Thread Paul Smith
D'oh... I am assuming from the subject line that you are already doing
this.

Perhaps I should have paid more attention.  Sorry for the waste of
bandwidth.

I'll now go and make my first coffee of the day to minimise the risk of
my foot getting anywhere near my mouth again.

cheers,

Paul

On Tue, 2003-12-09 at 08:11, Paul Smith wrote:
 Depends how you log your stacktrace.  If you log like this:
 
 private static final Logger LOG = Logger.getLogger(.);
 
 ...
 try {
 
 }
 catch(Exception e) {
   LOG.error(e);
 }
 
 Then you WILL only get the error message without the rest of the stack
 trace.  The reason is that the exception is going to the
 loggers.error(Object) method, and Log4j is simply calling the
 .toString() on the Exception object.
 
 This is a common mistake, and I've forgotten this several times myself. 
 
 What you really need to do is:
 
 LOG.error(An error happened here, e);
 
 This will ensure that the full stacktrace is output (assuming that the
 JDK 1.4.2 doesn't still get you)
 
 cheers,
 
 Paul Smith
 
 On Tue, 2003-12-09 at 07:23, struts wrote:
  I am also getting the similiar problem. Just I was able to see the stack
  trace in the console, but in the database, I can just see the error message
  without stack trace. Attached is my log4j.xml file. Anybody knows why?
  
  Thanks.
  
  Song
  
  Robert Augustyn [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   Paul,
   Thanks, I am running 1.4.2 vm and it does not look
   like it's fixed...
   It is real pain!.
   robert
  
   -Original Message-
   From: Paul Smith [mailto:[EMAIL PROTECTED]
   Sent: Thursday, November 27, 2003 7:02 PM
   To: Log4J Users List
   Subject: RE: I am not getting stack trace from
   logger.error(error,e)?
  
  
   On Fri, 2003-11-28 at 10:45, Robert Augustyn wrote:
  
Hi Ceki,
  
I am getting just one line like:
  
Java.NullPointerException:
  
  
  
   This maybe only a very slight possibility, but I have
   seen exactly what
  
   you are describing in our production environment when
   we are using the
  
   -server option under the Sun 1.4.2 JDK under Linux (no
   JBoss though).
  
   Just a single line with no more information.
  
  
  
   See this bug:
  
   http://developer.java.sun.com/developer/bugParade/bugs/4761344.html
  
  
  
   They say it is fixed in 1.4.2, and while it does not
   happen with the
  
   frequency it used to, it's one to look out for.  Not
   using the -server
  
   option seems to help, although you lose some
   performance there.
  
  
  
   cheers,
  
  
  
   Paul Smith
  
  
  
  
  
   -
  
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
  
   For additional commands, e-mail:
   [EMAIL PROTECTED]
  
  
  
  
   __
   Do you Yahoo!?
   Free Pop-Up Blocker - Get it now
   http://companion.yahoo.com/
  
  
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  begin 600 log4j.xml
  M/#]X;[EMAIL PROTECTED]VEO;CTB,2XP(B!E;F-O9EN9STB551[EMAIL 
  PROTECTED]/SX-CPA1$]#
  M5%E012!L;VT:C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`@(`@(`@(`@(`@(`@(`@(`@
  M(`@(`@(!E=F5N=$UA8VAI;F4L#0H@(`@(`@(`@(`@(`@(`@(`@
  M(`@(`@(`@(`@(`@(`@(`@(5V96YT5[EMAIL PROTECTED]@(`@(`@(`@
  M(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(5V96YT240L(`T*
  M(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(!E
  M=F5N=$QE=F5L+`D-B`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@
  M(`@(`@(`@([EMAIL PROTECTED];G1#871E9V]R2P-B`@(`@(`@(`@(`@(`@
  M(`@(`@(`@(`@(`@(`@(`@(`@([EMAIL PROTECTED]]N96YT3F%M92P-B`@
  M(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@([EMAIL PROTECTED]
  M;G1#;%STE$+`T*(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@
  M(`@(`@(`@(!E=F5N=$-L87-S15S8W)I'1I;VXL(`T*(`@(`@(`@
  M(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(`@(!E=F5N=$1E=%I
  M

Re: I am not getting stack trace from logger.error(error,e)?

2003-12-08 Thread struts
In the LoggEvent class, there are two methods, one is getRenderedMessage(),
another is getThrowableInformation(). My understand is  that
getRenderedMessage() return log message and getThrowableInformation()
returns stack trace.

My understand is that based on my pattern, there is a '%.300m' in there
which returns message only, so there is no stack trace available in this
case. Is this the case? If not, how is the throwableInformation included in
the output message?

Also there is a private method writeObject() which writes the
throwableInformation into output stream, I don't see it called anywhere in
the class. How does it work?

Thanks.

Song

Here is my sql pattern.

param name=sql
value=insert into eventLogEvents (
eventType,
eventMachine,
eventTime,
eventID,
eventLevel,
eventCategory,
componentName,
eventClassID,
eventClassDescription,
eventDetails
   )
values (
%p,
#TOKEN_EVENT_MACHINE_NAME#,
#%d{MM/dd/ HH:mm:ss}#,
#%c#,
3,
9,
#Secure Message Redirect#,
16000,
#[%c]#,
#[%c{1}] %.300m#
)

/

Thanks a lot.

Song

struts [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I am also getting the similiar problem. Just I was able to see the stack
 trace in the console, but in the database, I can just see the error
message
 without stack trace. Attached is my log4j.xml file. Anybody knows why?

 Thanks.

 Song

 Robert Augustyn [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Paul,
  Thanks, I am running 1.4.2 vm and it does not look
  like it's fixed...
  It is real pain!.
  robert
 
  -Original Message-
  From: Paul Smith [mailto:[EMAIL PROTECTED]
  Sent: Thursday, November 27, 2003 7:02 PM
  To: Log4J Users List
  Subject: RE: I am not getting stack trace from
  logger.error(error,e)?
 
 
  On Fri, 2003-11-28 at 10:45, Robert Augustyn wrote:
 
   Hi Ceki,
 
   I am getting just one line like:
 
   Java.NullPointerException:
 
 
 
  This maybe only a very slight possibility, but I have
  seen exactly what
 
  you are describing in our production environment when
  we are using the
 
  -server option under the Sun 1.4.2 JDK under Linux (no
  JBoss though).
 
  Just a single line with no more information.
 
 
 
  See this bug:
 
  http://developer.java.sun.com/developer/bugParade/bugs/4761344.html
 
 
 
  They say it is fixed in 1.4.2, and while it does not
  happen with the
 
  frequency it used to, it's one to look out for.  Not
  using the -server
 
  option seems to help, although you lose some
  performance there.
 
 
 
  cheers,
 
 
 
  Paul Smith
 
 
 
 
 
  -
 
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
 
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 
 
 
 
  __
  Do you Yahoo!?
  Free Pop-Up Blocker - Get it now
  http://companion.yahoo.com/







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



I am not getting stack trace from logger.error(error,e)?

2003-11-27 Thread Robert Augustyn
Hi,
I was expecting that I would get stack trace from following call:
}catch(Exception e){
  logger.error(Error,e);
}
 
What could possibly be a problem?
Thanks in advance.
robert
 


-
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

Re: I am not getting stack trace from logger.error(error,e)?

2003-11-27 Thread Ceki Gülcü


Your invocation of the 'error' method is correct. What are you observing? 
Have you configured log4j?

At 01:40 PM 11/27/2003 -0800, Robert Augustyn wrote:
Hi,
I was expecting that I would get stack trace from following call:
}catch(Exception e){
  logger.error(Error,e);
}
What could possibly be a problem?
Thanks in advance.
robert
--
Ceki Gülcü
 For log4j documentation consider The complete log4j manual
 ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



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


RE: I am not getting stack trace from logger.error(error,e)?

2003-11-27 Thread Robert Augustyn
Title: Message



Hi Ceki,I am getting just one line 
like:Java.NullPointerException:Yes, I have configured it.I have 
to add that this is used with 
jboss.Thanksrobert-Original Message-From: 
Ceki Gülcü [mailto:[EMAIL PROTECTED]]Sent: 
Thursday, November 27, 2003 4:49 PMTo: Log4J Users ListSubject: Re: I am 
not getting stack trace from 
logger.error("error",e)?Your invocation of the 
'error' method is correct. What are you observing?Have you configured 
log4j?At 01:40 PM 11/27/2003 -0800, Robert Augustyn 
wrote:Hi,I was expecting that I would get stack trace 
from following call:}catch(Exception e){ 
logger.error("Error",e);}What could possibly 
be a problem?Thanks in 
advance.robert--Ceki 
Gülcü For log4j documentation 
consider "The complete log4j manual" ISBN: 
2970036908 http://www.qos.ch/shop/products/clm_t.jsp-To 
unsubscribe, e-mail: [EMAIL PROTECTED]For 
additional commands, e-mail: 
[EMAIL PROTECTED]

Do you Yahoo!?
Free Pop-Up Blocker - Get it now?xml version=1.0 encoding=UTF-8?
!DOCTYPE log4j:configuration SYSTEM log4j.dtd

!-- = --
!--   --
!--  Log4j Configuration  --
!--   --
!-- = --

!-- $Id: log4j.xml,v 1.13.2.8 2003/09/23 14:16:27 slaboure Exp $ --

!--
   | For more configuration infromation and examples see the Jakarta Log4j
   | owebsite: http://jakarta.apache.org/log4j
 --

log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; debug=false

   !-- = --
   !-- Preserve messages in a local file --
   !-- = --

   !-- A time/date based rolling appender --
   appender name=FILE class=org.jboss.logging.appender.DailyRollingFileAppender
  errorHandler class=org.jboss.logging.util.OnlyOnceErrorHandler/
  param name=File value=${jboss.server.home.dir}/log/server.log/
  param name=Append value=false/

  !-- Rollover at midnight each day --
  param name=DatePattern value='.'-MM-dd/

  layout class=org.apache.log4j.PatternLayout
 !-- The default pattern: Date Priority [Category] Message\n --
 param name=ConversionPattern value=%d %-5p [%c] %m%n/


  /layout
   /appender



   !-- == --
   !-- Append messages to the console --
   !-- == --

   appender name=CONSOLE class=org.apache.log4j.ConsoleAppender
  errorHandler class=org.jboss.logging.util.OnlyOnceErrorHandler/
  param name=Target value=System.out/
  param name=Threshold value=INFO/

  layout class=org.apache.log4j.PatternLayout
 !-- The default pattern: Date Priority [Category] Message\n --
 param name=ConversionPattern value=%d{ABSOLUTE} %-5p [%c{1}] %m%n/
  /layout
   /appender

   appender name=JSR77 class=org.apache.log4j.FileAppender
  errorHandler class=org.jboss.logging.util.OnlyOnceErrorHandler/
  param name=Append value=false/
  param name=File value=${jboss.server.home.dir}/log/jsr77.log/
  layout class=org.apache.log4j.PatternLayout
 param name=ConversionPattern value=%d{ABSOLUTE} %-5p [%c{1}] %m%n/
  /layout
   /appender



   !--  --
   !-- Limit categories --
   !--  --

   !-- Limit the org.apache.commons category to INFO as its DEBUG is verbose --
   category name=org.apache.commons
  priority value=INFO/
   /category

   !-- Limit JBoss categories to INFO --
   category name=org.jboss
 priority value=INFO/
   /category


   !-- === --
   !-- Setup the Root category --
   !-- === --

   root
  appender-ref ref=CONSOLE/
  appender-ref ref=FILE/
   /root


/log4j:configuration


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

RE: I am not getting stack trace from logger.error(error,e)?

2003-11-27 Thread Paul Smith
On Fri, 2003-11-28 at 10:45, Robert Augustyn wrote:
 Hi Ceki,
 I am getting just one line like:
 Java.NullPointerException:

This maybe only a very slight possibility, but I have seen exactly what
you are describing in our production environment when we are using the
-server option under the Sun 1.4.2 JDK under Linux (no JBoss though). 
Just a single line with no more information.

See this bug:
http://developer.java.sun.com/developer/bugParade/bugs/4761344.html

They say it is fixed in 1.4.2, and while it does not happen with the
frequency it used to, it's one to look out for.  Not using the -server
option seems to help, although you lose some performance there.

cheers,

Paul Smith


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



RE: I am not getting stack trace from logger.error(error,e)?

2003-11-27 Thread Robert Augustyn
Paul,
Thanks, I am running 1.4.2 vm and it does not look
like it's fixed...
It is real pain!.
robert

-Original Message-
From: Paul Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 27, 2003 7:02 PM
To: Log4J Users List
Subject: RE: I am not getting stack trace from
logger.error(error,e)?


On Fri, 2003-11-28 at 10:45, Robert Augustyn wrote:

 Hi Ceki,

 I am getting just one line like:

 Java.NullPointerException:



This maybe only a very slight possibility, but I have
seen exactly what

you are describing in our production environment when
we are using the

-server option under the Sun 1.4.2 JDK under Linux (no
JBoss though). 

Just a single line with no more information.



See this bug:

http://developer.java.sun.com/developer/bugParade/bugs/4761344.html



They say it is fixed in 1.4.2, and while it does not
happen with the

frequency it used to, it's one to look out for.  Not
using the -server

option seems to help, although you lose some
performance there.



cheers,



Paul Smith





-

To unsubscribe, e-mail:
[EMAIL PROTECTED]

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




__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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