http-rs / tide

Fast and friendly HTTP server framework for async Rust
https://docs.rs/tide
Apache License 2.0
5.07k stars 321 forks source link

Fix sse log change to femme and kv_log_macro #902

Closed ghost closed 1 year ago

ghost commented 1 year ago

Fixed below two things in sse.

  1. Use the git version of tide, I had below error. Fixed it refere #889.
error[E0433]: failed to resolve: could not find `error` in `log`
  --> tide/src/sse/endpoint.rs:51:22
   |
51 |                 log::error!("SSE handler error: {:?}", err);
   |                      ^^^^^ could not find `error` in `log`

error[E0433]: failed to resolve: could not find `error` in `log`
  --> tide/src/sse/upgrade.rs:22:18
   |
22 |             log::error!("SSE handler error: {:?}", err);
   |                  ^^^^^ could not find `error` in `log`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `tide` due to 2 previous errors
  1. example/sse.rs had build error.
error[E0425]: cannot find function `start` in module `tide::log`
 --> examples/sse.rs:5:16
  |
5 |     tide::log::start();
  |                ^^^^^ not found in `tide::log`
  |
help: consider importing one of these items
  |
1 | use femme::start;
  |
1 | use logtest::start;
  |
help: if you import `start`, refer to it directly
  |
5 -     tide::log::start();
5 +     start();
  |

For more information about this error, try `rustc --explain E0425`.
error: could not compile `tide` due to previous error