You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2018/09/18 10:05:45 UTC

[incubator-pulsar] branch master updated: [java-client] Issue #2384: ConnectionHandler: Log stack trace instead of printing (#2599)

This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new c866279  [java-client] Issue #2384: ConnectionHandler: Log stack trace instead of printing (#2599)
c866279 is described below

commit c86627948d4abf4b50517338c739f0dea8029849
Author: Sijie Guo <gu...@gmail.com>
AuthorDate: Tue Sep 18 03:05:40 2018 -0700

    [java-client] Issue #2384: ConnectionHandler: Log stack trace instead of printing (#2599)
    
    *Motivation*
    
    Fixes #2384.
    
    The pulsar java client is currently very noisy in case of connection loss and it cannot be muted, as the stack trace is printed with .printStackTrace(). Moving this to the logging system will allow developers to configure this behavior.
    
    *Changes*
    
    Remove `printStackTrace`.
---
 .../src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java   | 1 -
 1 file changed, 1 deletion(-)

diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java
index d9bdc74..d04e8a8 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java
@@ -71,7 +71,6 @@ class ConnectionHandler {
     }
 
     private Void handleConnectionError(Throwable exception) {
-        exception.printStackTrace();
         log.warn("[{}] [{}] Error connecting to broker: {}", state.topic, state.getHandlerName(), exception.getMessage());
         connection.connectionFailed(new PulsarClientException(exception));