Skip to content
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

Logging type error #1013

Closed
schonert opened this issue Sep 15, 2022 · 4 comments
Closed

Logging type error #1013

schonert opened this issue Sep 15, 2022 · 4 comments
Labels

Comments

@schonert
Copy link

Issue summary

I'm trying to change the global logger to SemanticLogger::Logger but facing a Sorbet type error.

Expected behavior

I'd expect that ShopifyAPI would allow using any logger

Actual behavior

Sorbet type check error

Steps to reproduce the problem

  1. Add gem "rails_semantic_logger" to gem file
  2. bundle install
  3. Set ShopifyAPI logger to Rails.logger in in Context.setup. ShopifyAPI::Context.setup( logger: Rails.logger )
  4. Start Rails rails s

Logs

`cast': T.cast: Expected type Logger, got type SemanticLogger::Logger with hash 227568649015452756 (TypeError)

Specifications

  • shopify_api version: 11.1.0
  • Shopify API version used (example: 2022-07):
@github-actions
Copy link

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

@github-actions github-actions bot added the Stale label Nov 15, 2022
@github-actions
Copy link

We are closing this issue because it has been inactive for a few months.
This probably means that it is not reproducible or it has been fixed in a newer version.
If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.

If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines

Thank you!

@multiplegeorges
Copy link

This error also occurs with GCP's Stackdriver gem, which replaces the Logger with a Google::Cloud::Logging::Logger.

@csoare7
Copy link

csoare7 commented Apr 4, 2024

I'm also getting this issue with Stackdriver - how did you end up fixing it?

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

No branches or pull requests

3 participants