commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsi...@apache.org
Subject cvs commit: jakarta-commons/logging/src/java/org/apache/commons/logging/impl SimpleLog.java
Date Sat, 19 Oct 2002 17:19:05 GMT
rsitze      2002/10/19 10:19:05

  Modified:    logging/src/java/org/apache/commons/logging/impl
                        SimpleLog.java
  Log:
  Dump stack trace through logger, not stdout
  (preservers sequence of buffered output).
  
  Revision  Changes    Path
  1.5       +10 -5     jakarta-commons/logging/src/java/org/apache/commons/logging/impl/SimpleLog.java
  
  Index: SimpleLog.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/src/java/org/apache/commons/logging/impl/SimpleLog.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SimpleLog.java	15 Jun 2002 20:54:48 -0000	1.4
  +++ SimpleLog.java	19 Oct 2002 17:19:05 -0000	1.5
  @@ -360,7 +360,12 @@
               buf.append(" <");
               buf.append(t.toString());
               buf.append(">");
  -            t.printStackTrace();
  +
  +            java.io.StringWriter sw= new java.io.StringWriter(1024); 
  +            java.io.PrintWriter pw= new java.io.PrintWriter(sw); 
  +            t.printStackTrace(pw);
  +            pw.close();
  +            buf.append(sw.toString());
           }
   
           // print to System.err
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message