Skip to content

GH-46350: [C++] Custom logging for S3 SDK #46519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mderoy
Copy link

@mderoy mderoy commented May 20, 2025

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?

  • A virtual S3Logger class which the user can implement
  • A wrapper class in arrow which implements Aws::Utils::Logging::DefaultLogSystem
    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

Copy link

⚠️ GitHub issue #46350 has been automatically assigned in GitHub to PR creator.

@mderoy mderoy force-pushed the mkderoy/custom-logging branch from 0b55d31 to 7e26e05 Compare May 20, 2025 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant