Add support for accessing and clearing an access log
I see Xcode log every request but it would be cool to have access to this data inside of swift so I could say build a view in my app to show these requests and optionally have the ability to clear them.
Not a huge priority but could be a nice to have.
It is already is possible to init the server with any Logging instance:
let server = HTTPServer(port: 8080, logger: MyLogger())
Would this be sufficient for your needs? Or are you looking for something more explicit for certain events:
- on request / response
- on connect / disconnect
I think I might need the distinction of on request/response for what I'm wanting to build. I might be able to filter them out somehow by parsing the string as it goes but having a more concrete method would be more stable I think. I didn't even notice the logger feature so thanks for pointing that out.