Skip to content

Add support for accessing and clearing an access log #123

Description

@blaineam

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.

Activity

  1. swhitty commented on Oct 16, 2024

    @swhitty
    Owner

    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
  2. blaineam commented on Oct 16, 2024

    @blaineam
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions