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

Add missing level_override instance variable to logger #initialize #32

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

choosen
Copy link

@choosen choosen commented Jun 28, 2024

Adds compatibility for most recent, included in ruby 3.3.3 logger. ruby/logger@7aabb0b

Issue

I've got 3.3.3 ruby with bundled Logger 1.6.0

eval error: undefined method `[]' for nil
  /Users/dev/.asdf/installs/ruby/3.3.3/lib/ruby/3.3.0/logger.rb:384:in `level'
  /Users/dev/.asdf/installs/ruby/3.3.3/lib/ruby/3.3.0/logger.rb:653:in `add'
  /Users/dev/.asdf/installs/ruby/3.3.3/lib/ruby/3.3.0/logger.rb:697:in `info'
  /Users/dev/.asdf/installs/ruby/3.3.3/lib/ruby/3.3.0/forwardable.rb:240:in `info'

there is missing empty hash in initialize.

Description of changes:

It should be compatible with previous versions of Ruby.

Target (OCI, Managed Runtime, both):

ruby 3.3.3 or most recent logger version.
I run lambda in self hosted ruby container in general, but it is not required to test within docker, as code breaks on specs when applying LoggerPatch.


solves #33

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@choosen
Copy link
Author

choosen commented Aug 30, 2024

@trivenay Can you look at it ?

@choosen
Copy link
Author

choosen commented Aug 30, 2024

or @briensea ?

@choosen
Copy link
Author

choosen commented Sep 2, 2024

logger 1.6.1 started to be compatible :)
#33 (comment)

if you want to be with bundled logger gem with 3.3 ruby please merge it, to not force for workarounds

@choosen
Copy link
Author

choosen commented Feb 28, 2025

adapted to changes from https://github.com/ruby/logger/pull/100/files

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

Successfully merging this pull request may close these issues.

2 participants