Debug-via-print pattern on axum

⚓ rust    📅 2025-06-13    👤 surdeus    👁️ 1      

surdeus

Trying to support a team migrating from other languages (php, jvm) where our systems used to prepend time and request id to all output generated by a backend code.

It made filtering a request on the logs very convenient.

I've added a trace layer to axum but that only prepends the information on things generated by axum.

Is there a pattern i can use to have anything outputted by the route handler also be prefixed?

2 posts - 2 participants

Read full topic

🏷️ rust_feed