carllerche / tower-web

A fast, boilerplate free, web framework for Rust
MIT License
980 stars 51 forks source link

Using the LogMiddleware #147

Closed ebkalderon closed 5 years ago

ebkalderon commented 5 years ago

Is there any documentation on how to properly configure the target of the LogMiddleware? I can verify that the logging in middleware.rs example works as it should, but I am unable to get any log output working in my own applications. I tried switching the example "hello_world::web" target to "my_crate::web", "my_crate", "my_crate::path::to::my_resource::web", "my_resource::web", and "my_resource", and all attempts seem to do nothing.

ebkalderon commented 5 years ago

Retried "my_crate::web" again, and it seems to be working now after a clean rebuild. This appears to be the correct format. Hopefully this helps anyone who finds this issue in the future.