Skip to content

Provide a way to hook into logging for this gem #320

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

Closed
codenamev opened this issue Aug 29, 2023 · 1 comment
Closed

Provide a way to hook into logging for this gem #320

codenamev opened this issue Aug 29, 2023 · 1 comment

Comments

@codenamev
Copy link
Contributor

Is your feature request related to a problem? Please describe.
A common pattern for gems is to provide a configurable logger that can be used throughout the library to broadcast useful information. An example of the need here.

Describe the solution you'd like
Ideally, a logger method be added to the root namespace so it can be accessed from any part of the library. The logger would return an instance of Ruby's Logger class (or a descendent), and this would be configurable within OpenAI.configure

@alexrudall
Copy link
Owner

Thanks @codenamev, v6.3 adds a way to add a logger via Faraday's middleware - see README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants