-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Thank you for developing this library, and
Hello, I had tried two ways creating Tower layers to make some logs:
- the first approach is to simple create a Tower layer, logging on trait methods
fn notify,fn emitandfn call - the second approach is enable the
forwardfeature, mock the server and client like whatexamples/interceptor.rsdo, logging on trait methodsfn notify,fn emitandfn call
both approach applies logs for requests from server to client, but does not work for the requests that I filed from client with ServerSocket::request, where the ServerSocket instance is returned by MainLoop::new_client.
My questions are:
- will calls on
ServerSocket::requestreturnedMainLoop::new_clientapplies Tower layers? - did I miss something or some methods when logging on trait methods
fn notify,fn emitandfn call - what is the
eventin the library?
I had also tried to use the builder function MainLoop::new_client's server socket argument, use router.request::<ACustomRequest>(|router_state, request| { logging here; return here }). but
- I do not know that does the parameter server socket of the
MainLoop::new_clientdo - the logging seems in the
.request::<MainLoop::new_client>(....)does not work, the callback is not fired - in the
.request::<MainLoop::new_client>(....)callback, calling the.requestofserver_socketyields theResult<_, async_lsp:Error>, but not theResult<_, async_lsp:ResponseError>which is required by therouter.requestcallback
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request