-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix "Listening on" log message #1136
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
Conversation
- resolves #1044
14bb224
to
ad650c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried examples
$ java -Dquarkus.http.host=0.0.0.0 -jar target/servletdemo-runner.jar
2019-03-01 23:27:08,646 INFO [io.quarkus] (main) Quarkus 1.0.0.Alpha1-SNAPSHOT started in 0.514s.
Listening on: http://0:0:0:0:0:0:0:0:8080
2019-03-01 23:27:08,649 INFO [io.quarkus] (main) Installed features: [cdi]
^C2019-03-01 23:27:10,979 INFO [io.quarkus] (main) Quarkus stopped in 0.012s
$ java -Dquarkus.http.host=0.0.0.0 -Djava.net.preferIPv4Stack=true -jar target/servletdemo-runner.jar
2019-03-01 23:27:16,117 INFO [io.quarkus] (main) Quarkus 1.0.0.Alpha1-SNAPSHOT started in 0.550s.
Listening on: http://0.0.0.0:8080
2019-03-01 23:27:16,120 INFO [io.quarkus] (main) Installed features: [cdi]
^C2019-03-01 23:27:18,257 INFO [io.quarkus] (main) Quarkus stopped in 0.010s
$ java -Dquarkus.http.host=192.168.1.132 -jar target/servletdemo-runner.jar
2019-03-01 23:27:39,388 INFO [io.quarkus] (main) Quarkus 1.0.0.Alpha1-SNAPSHOT started in 0.497s.
Listening on: http://192.168.1.132:8080
2019-03-01 23:27:39,391 INFO [io.quarkus] (main) Installed features: [cdi]
^C2019-03-01 23:27:42,171 INFO [io.quarkus] (main) Quarkus stopped in 0.011s
That first one looks a bit funny; if we insist on rendering these things as URLs we should definitely use |
@dmlloyd Do you want that change to use |
Yeah let's fix that, so the URLs are at least valid. |
@mkouba Martin, and you add that change so I can merge this? |
String address; | ||
if (l.getAddress() instanceof InetSocketAddress) { | ||
InetSocketAddress inetAddress = (InetSocketAddress) l.getAddress(); | ||
address = inetAddress.getHostString() + ":" + inetAddress.getPort(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this line should be:
address = Inet.toURLString(addr, true) + ":" + inetAddress.getPort();
The log message now looks like: