activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Aumayr (JIRA)" <>
Subject [jira] [Created] (AMQ-5122) Unnecessary log of Stacktrace within DiscoveryNetworkConnector
Date Thu, 27 Mar 2014 12:10:17 GMT
Andreas Aumayr created AMQ-5122:

             Summary: Unnecessary log of Stacktrace within DiscoveryNetworkConnector
                 Key: AMQ-5122
             Project: ActiveMQ
          Issue Type: Improvement
          Components: Connector
    Affects Versions: 5.9.0
            Reporter: Andreas Aumayr
            Priority: Minor

 - one embedded broker with a configured networkConnector:
		<networkConnector name="linkToParentBroker"
			uri="static:(tcp://" />

- a logLevel that shows at leat WARN messages
- no other broker available (i.e. nobody is listening on tcp://

I would expect to see a warning in the logfiles that indicates: "Hey, I'm not able to start
the network bridge you configured". But instead it prints out the warning and a full stacktrace.

2014-03-27_13:01:21.777 [ActiveMQ Task-1] WARN -
Could not start network bridge between: vm://localhost?async=false&network=true and: tcp://
due to: {} Connection refused: connect
	at Method) ~[na:1.6.0_25]
	at Source) ~[na:1.6.0_25]
	at Source) ~[na:1.6.0_25]
	at Source) ~[na:1.6.0_25]
	at Source) ~[na:1.6.0_25]
	at Source) ~[na:1.6.0_25]
	at org.apache.activemq.transport.tcp.TcpTransport.connect( ~[activemq-all-5.9.0.jar:5.9.0]
	at org.apache.activemq.transport.tcp.TcpTransport.doStart( ~[activemq-all-5.9.0.jar:5.9.0]
	at org.apache.activemq.util.ServiceSupport.start( ~[activemq-all-5.9.0.jar:5.9.0]
	at org.apache.activemq.transport.AbstractInactivityMonitor.start(
	at org.apache.activemq.transport.TransportFilter.start( ~[activemq-all-5.9.0.jar:5.9.0]
	at org.apache.activemq.transport.WireFormatNegotiator.start(
	at org.apache.activemq.transport.TransportFilter.start( ~[activemq-all-5.9.0.jar:5.9.0]
	at org.apache.activemq.transport.TransportFilter.start( ~[activemq-all-5.9.0.jar:5.9.0]
	at org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent$
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [na:1.6.0_25]
	at java.util.concurrent.ThreadPoolExecutor$ Source) [na:1.6.0_25]
	at Source) [na:1.6.0_25]

Looking at the code ( we can see that there are two logging
statements. One Warning and one Debug:
                LOG.warn("Could not start network bridge between: {} and: {} due to: {}",
new Object[]{ localURI, uri, e });
                LOG.debug("Start failure exception: ", e);

I think it would be sufficient if the warning logged only the message from the exception,
but not the whole stacktrace.

This message was sent by Atlassian JIRA

View raw message