jamesrochabrun / SwiftAnthropic

An open-source Swift package for interacting with Anthropic's public API.
90 stars 29 forks source link

Can't seem to disable all the debug logs for chunks received #22

Closed provencher closed 2 months ago

provencher commented 3 months ago

The library's debug logs are polluting my console and I'd like to remove them but don't see how.

Would be great to optionally suppress these logs in debug view as it's preventing me from debugging issues with my app.

sakeven commented 3 months ago

@jamesrochabrun As a library, I believe it should not use #if DEBUG to print logs, because the applications integrating the library also need to use #if DEBUG to print its debug logs. If the library uses it as well, it will result in a large number of logs mixed together. It's better to use a custom flag for logging, so that by default, the integrating party will not enable it.

jamesrochabrun commented 2 months ago

I agree I just did not had the time to update it! Contributions are welcome as well! I will try to find time this month.

jamesrochabrun commented 2 months ago

https://github.com/jamesrochabrun/SwiftAnthropic/releases/tag/v1.8 @provencher @sakeven Done!