Skip to content

Commit 2b0b361

Browse files
authored
dx: INFO! log howl(s)ed address (#511)
* dx: `INFO!` log `holwl(s)`ed local address * update examples
1 parent 914aee1 commit 2b0b361

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

examples/hello/src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ async fn main() {
9999
.with_max_level(tracing::Level::INFO)
100100
.init();
101101

102-
tracing::info!("Started listening on http://localhost:3000");
103-
104102
Ohkami::new((
105103
fangs::LogRequest,
106104
"/hc" .GET(health_handler::health_check),

ohkami/src/ohkami/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,9 @@ impl Ohkami {
594594
let router = Arc::new(router);
595595

596596
let listener = bind.ino_tcp_listener().await;
597-
598597
let (wg, ctrl_c) = (sync::WaitGroup::new(), sync::CtrlC::new());
598+
599+
crate::INFO!("start serving on {}", listener.local_addr().unwrap());
599600

600601
while let Some(accept) = ctrl_c.until_interrupt(listener.accept()).await {
601602
let (connection, addr) = {
@@ -710,6 +711,8 @@ impl Ohkami {
710711
let listener = bind.ino_tcp_listener().await;
711712
let (wg, ctrl_c) = (sync::WaitGroup::new(), sync::CtrlC::new());
712713

714+
crate::INFO!("start serving on {}", listener.local_addr().unwrap());
715+
713716
while let Some(accept) = ctrl_c.until_interrupt(listener.accept()).await {
714717
let Ok((tcp_stream, addr)) = accept else { continue };
715718

0 commit comments

Comments
 (0)