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

`syslog/logger` from the Ruby standard library is missing in JRuby 9 #4691

Closed
patch0 opened this Issue Jun 27, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@patch0

patch0 commented Jun 27, 2017

This was originally reported against jruby 1.7 in #1672

Environment

$ jruby -v
jruby 9.1.10.0 (2.3.3) 2017-05-25 b09c48a OpenJDK 64-Bit Server VM 25.131-b11 on 1.8.0_131-8u131-b11-2-b11 +jit [linux-x86_64]
$ ruby -v
ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
$ uname -a
Linux dynamo 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u1 (2017-06-18) x86_64 GNU/Linux

No other environment set.

Expected Behavior

Requiring syslog/logger should work.

$ ruby -r syslog/logger -e 'puts "OK"'
OK

Actual Behavior

It raises a LoadError.

$ jruby -r syslog/logger -e 'puts "OK"'
LoadError: no such file to load -- syslog/logger
  require at org/jruby/RubyKernel.java:961
  require at /usr/lib/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
@enebo

This comment has been minimized.

Show comment
Hide comment
@enebo

enebo Aug 21, 2017

Member

@patch0 can you kick the tires on this fix? I just added the missing file and I see nothing which seems like it would be broken in this file but MRI's tests is willing to stub out this file if missing and it relies on fork for an important test (which we do not have).

Member

enebo commented Aug 21, 2017

@patch0 can you kick the tires on this fix? I just added the missing file and I see nothing which seems like it would be broken in this file but MRI's tests is willing to stub out this file if missing and it relies on fork for an important test (which we do not have).

@patch0

This comment has been minimized.

Show comment
Hide comment
@patch0

patch0 Aug 31, 2017

Works fine :)

patch@dynamo:~$ jirb
irb(main):001:0> require 'syslog/logger'
=> true
irb(main):002:0> log = Syslog::Logger.new 'my_program'
=> #<Syslog::Logger:0x71ba6d4e @formatter=#<Syslog::Logger::Formatter:0x738dc9b>, @facility=8, @level=0>
irb(main):003:0> log.info 'this line will be logged via syslog(3)'
=> true

Then in syslog:

Aug 31 09:51:40 localhost my_program[24631]: this line will be logged via syslog(3)

Thanks!

patch0 commented Aug 31, 2017

Works fine :)

patch@dynamo:~$ jirb
irb(main):001:0> require 'syslog/logger'
=> true
irb(main):002:0> log = Syslog::Logger.new 'my_program'
=> #<Syslog::Logger:0x71ba6d4e @formatter=#<Syslog::Logger::Formatter:0x738dc9b>, @facility=8, @level=0>
irb(main):003:0> log.info 'this line will be logged via syslog(3)'
=> true

Then in syslog:

Aug 31 09:51:40 localhost my_program[24631]: this line will be logged via syslog(3)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment