GH-46350: [C++] Custom logging for S3 SDK #46519
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Some applications have their own way of logging, however there is no way for the user to implement a custom logger to get more information from arrow, as it always logs to the console
What changes are included in this PR?
The user can then add their own S3Logger derived class to S3GlobalOptions and they will be wrapped by WrappedS3Logger and given to S3 when we initialize
As I understand it, arrow doesn't want to expose aws headers directly, since a user may have linked their own awssdk at a different version. This approach works around that issue. I'm happy to retool it in a different direction with review feedback.
Are these changes tested?
They are tested our fork in arrow 13.0.0.0 but I have not tested with the latest code, as I'm unable to build main in my environment (it looks like a new build dependency on ninja was added and I'm not able to install it at the moment on my system). I have opened this PR via a cherry-pick of my changes.
Are there any user-facing changes?
No, these settings are for advanced users of the C++ sdk with S3FS