paritytech / jsonrpc

Rust JSON-RPC implementation
MIT License
791 stars 274 forks source link

Request log #647

Closed zzhengzhuo closed 3 years ago

zzhengzhuo commented 3 years ago

I'd like to log user-agent header,time consumption and so on in http jsonrpc server. Is there any good way?

tomusdrw commented 3 years ago

Please take a look at the middlewares:

  1. HTTP server request middleware: docs, example
  2. Core Middlewares: docs, example