Skip to content

Warning on Ruby 3.3 because of requiring syslog package #247

@Earlopain

Description

@Earlopain

Ruby 3.3 will issue a warning when requiring syslog, Ruby 3.4 will raise an error. https://github.com/ruby/ruby/blob/master/doc/NEWS/NEWS-3.3.0.md#stdlib-updates

I'm talking about these lines of code:

logging/lib/logging.rb

Lines 9 to 15 in df41715

begin
require 'syslog'
HAVE_SYSLOG = true
rescue LoadError
HAVE_SYSLOG = false
end

This already handles the absense of syslog which is good so the gem will not break (much) in the future because of this. However, on Ruby 3.3 a warning message is logged nontheless. Users on linux that use the syslog appender will have that class be undefined on Ruby 3.4.

/home/user/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/logging-2.3.1/lib/logging.rb:10: warning: syslog was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add syslog to your Gemfile or gemspec. Also contact author of logging-2.3.1 to add syslog into its gemspec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions