Skip to content

Commit

Permalink
fixes #384 output the stacktrace when server registration fails (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehu authored Feb 12, 2019
1 parent 45c80bb commit 3792e95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/main/java/com/networknt/server/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,9 @@ static private boolean bind(HttpHandler handler, int port) {
return true;
} catch (Exception e) {
System.out.println("Failed to bind to port " + port);
e.printStackTrace(System.out);
if (logger.isInfoEnabled())
logger.info("Failed to bind to port " + port);
logger.info("Failed to bind to port " + port, e);
return false;
}
}
Expand Down

0 comments on commit 3792e95

Please sign in to comment.