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

runtimes/core: log listen address on startup #1531

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runtimes/core/src/api/gateway/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Router {
Method::TRACE => &mut mr.trace,
Method::PATCH => &mut mr.patch,
};
log::debug!(path = path, method = method.as_str(); "registering route");
log::trace!(path = path, method = method.as_str(); "registering route");
if dst.is_some() {
::log::error!(method = method.as_str(), path = path; "tried to register same route twice, skipping");
continue;
Expand Down
4 changes: 4 additions & 0 deletions runtimes/core/src/api/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ impl Manager {
let gateway_fut = match gateway_parts {
(Some(gw), Some(ref ln)) => {
if !testing {
log::debug!(addr=ln; "gateway listening for incoming requests");
Some(gw.serve(ln))
} else {
// No need running the gateway in tests
Expand All @@ -400,6 +401,9 @@ impl Manager {

let api_fut = match api_listener {
Some(ln) => {
let addr = ln.local_addr().map(|addr| addr.to_string()).unwrap_or_default();
log::debug!(addr = addr; "api server listening for incoming requests");

ln
.set_nonblocking(true)
.context("unable to set nonblocking")?;
Expand Down
Loading