Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot suppress output of "Lost connection to the server...." #205

Closed
Ken1S opened this issue Feb 8, 2018 · 4 comments
Closed

Cannot suppress output of "Lost connection to the server...." #205

Ken1S opened this issue Feb 8, 2018 · 4 comments
Assignees
Labels
bug fix checked in Fix checked into main or preview, but not yet released.

Comments

@Ken1S
Copy link

Ken1S commented Feb 8, 2018

  • OS and version used: Windows 10

  • Java runtime used: Java 8

  • SDK version used: 1.7.0

Description of the issue:

Printout of "Lost connection to the server." is printed both to System.out and to log.
This makes it harder/impossible to suppres that output that would go to log with info level.

I found the message in
https://github.com/Azure/azure-iot-sdk-java/blob/master/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/amqps/AmqpsIotHubConnection.java#L769


System.out.println("Lost connection to the server. Reconnection attempt " + currentReconnectionAttempt++ + "...");
logger.LogInfo("Lost connection to the server. Reconnection attempt %s, method name is %s ", currentReconnectionAttempt, logger.getMethodName());

My suggestion is to remove the System.out line

timtay-microsoft added a commit that referenced this issue Feb 8, 2018
… for AMQP

Remove printing to console from reconnection logic for AMQP

Github Issue #205
@timtay-microsoft
Copy link
Member

We are working to get this fix squeezed in for our planned 2/9 release. I will keep you posted

@timtay-microsoft
Copy link
Member

The fix for this issue has been checked in and will be in the next release today.

@timtay-microsoft timtay-microsoft added the fix checked in Fix checked into main or preview, but not yet released. label Feb 9, 2018
@timtay-microsoft
Copy link
Member

This bug is now fixed as of Device Client version 1.8.0

https://github.com/Azure/azure-iot-sdk-java/releases/tag/2018-2-9

@yzhong94
Copy link
Contributor

yzhong94 commented Mar 29, 2018

@Ken1S thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix checked in Fix checked into main or preview, but not yet released.
Projects
None yet
Development

No branches or pull requests

4 participants