FlyingFox icon indicating copy to clipboard operation
FlyingFox copied to clipboard

Add support for accessing and clearing an access log

Open blaineam opened this issue 1 year ago • 2 comments

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.

blaineam avatar Oct 15 '24 14:10 blaineam

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

swhitty avatar Oct 16 '24 07:10 swhitty

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.

blaineam avatar Oct 16 '24 14:10 blaineam