Skip to content

Add logger as runtime dependency#9839

Closed
quanghuynguyen1902 wants to merge 1 commit intojekyll:masterfrom
quanghuynguyen1902:fix-logger-dependency-warning
Closed

Add logger as runtime dependency#9839
quanghuynguyen1902 wants to merge 1 commit intojekyll:masterfrom
quanghuynguyen1902:fix-logger-dependency-warning

Conversation

@quanghuynguyen1902
Copy link
Copy Markdown

@quanghuynguyen1902 quanghuynguyen1902 commented Jun 10, 2025

Pull Request: Add logger dependency for Ruby 3.5.0 compatibility

Resolves #9763 by adding logger ~> 1.4 as runtime dependency to prevent Ruby 3.5.0 compatibility warnings

This is a 🐛 bug fix.

Summary

Adds logger ~> 1.4 as a runtime dependency to prevent Ruby 3.5.0 compatibility warnings that appear when using Jekyll with Ruby 3.4+.

Changes:

  • Added s.add_runtime_dependency("logger", "~> 1.4") to jekyll.gemspec
  • Eliminates the warning: "logger was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0"

Testing:

  • Verified with Ruby 3.4.4 that the warning no longer appears
  • Jekyll functions normally with the explicit logger dependency

Resolves jekyll#9763 by adding logger ~> 1.4 as runtime dependency
to prevent Ruby 3.5.0 compatibility warnings
@ashmaroli
Copy link
Copy Markdown
Member

Thank you for submitting this pull request, @quanghuynguyen1902 but unfortunately, this change may not be in Jekyll itself.

I believe Jekyll's dependency gem 'mercenary' would be the ideal library to have this change.

@taketo1113
Copy link
Copy Markdown

Since Jekyll itself also directly uses require "logger", it might make sense to add logger as a runtime dependency to the jekyll gem as well.
@ashmaroli Would this be acceptable?

require "logger"

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.

[Bug]: gem logger was loaded from the standard library

3 participants