You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ps...@apache.org on 2004/05/10 00:29:39 UTC

cvs commit: logging-log4j/src/java/org/apache/log4j/net SocketAppender.java

psmith      2004/05/09 15:29:39

  Modified:    src/java/org/apache/log4j/net SocketAppender.java
  Log:
  Changed so that failure to connect to a remote Socket doesn't output ugly stack trace, but
  it is still an error, and you still get the underlying Exception message string, without having
  the full trace.
  
  This is nicer.  Suggested by Jacob Kyome.
  
  Revision  Changes    Path
  1.22      +4 -1      logging-log4j/src/java/org/apache/log4j/net/SocketAppender.java
  
  Index: SocketAppender.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/net/SocketAppender.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- SocketAppender.java	27 Feb 2004 16:47:32 -0000	1.21
  +++ SocketAppender.java	9 May 2004 22:29:39 -0000	1.22
  @@ -226,7 +226,10 @@
           fireConnector(); // fire the connector thread
         }
   
  -      LogLog.error(msg, e);
  +      /**
  +       * Rather than log an ugly stack trace, output the msg
  +       */
  +      LogLog.error(msg + "(" + e + ")");
       }
     }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org