launchdarkly / ios-client-sdk

LaunchDarkly Client-side SDK for iOS (Swift and Obj-C)
https://docs.launchdarkly.com/sdk/client-side/ios
Other
68 stars 82 forks source link

Ability to configure logging #359

Closed patrickcapadmi closed 3 months ago

patrickcapadmi commented 3 months ago

The SDK currently writes a large number of logs to the console for all of it's internal operations. This is helpful for debugging issues with Launch Darkly but a lot of spam to the console otherwise.

This seems to have been introduced with SDK version 9.4.0 with this change: https://github.com/launchdarkly/ios-client-sdk/pull/340

I'd like the ability via logging levels or a boolean flag to customise the levels of or enable/ disable logging from the SDK.

Additional context SDK version 9.4.0+

tanderson-ld commented 3 months ago

Hi @patrickcapadmi, thank you for reaching out. Does the config option posted in this closed issue fit your needs?

patrickcapadmi commented 3 months ago

Ahh, thanks looks like that will do the trick.

I'd possibly suggest adding info on that to this page in the docs as I'd assumed it wasn't possible given the iOS Client SDK is missing - https://docs.launchdarkly.com/sdk/features/logging

tanderson-ld commented 3 months ago

Thank you for bringing that to our attention. We didn't realize it was missing over there. Tracking as 238017 internally.