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

Logger does not reflect actual listening address and port #70

Open
jwilm opened this issue Dec 22, 2015 · 0 comments
Open

Logger does not reflect actual listening address and port #70

jwilm opened this issue Dec 22, 2015 · 0 comments

Comments

@jwilm
Copy link

jwilm commented Dec 22, 2015

When asking Iron to listen on localhost:0, the kernel assigns an unused port number, and getaddrinfo resolves localhost to 127.0.0.1. The actual address can be displayed via format!("{}", listening.socket) where listening is an instance of the type returned by Iron::http and friends.

Example output from racerd

The first line is my own logging, and the second line is from this crate.

racerd listening at 127.0.0.1:54663
GET http://localhost:0/ping -> 200 OK (0.086167 ms)

Discussion

I'm not familiar with all members of the Request type, but it seems that Iron would need to pass in either the address or a reference to the listening server in order to access this information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant