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

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

patch0 opened this issue Jun 27, 2017 · 2 comments

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

patch0 opened this issue Jun 27, 2017 · 2 comments


Copy link

@patch0 patch0 commented Jun 27, 2017

This was originally reported against jruby 1.7 in #1672


$ jruby -v
jruby (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"'

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/
  require at /usr/lib/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
@enebo enebo added this to the JRuby milestone Aug 21, 2017
@enebo enebo closed this in 1e18da8 Aug 21, 2017
enebo added a commit that referenced this issue Aug 21, 2017
Copy link

@enebo 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).

Copy link

@patch0 patch0 commented Aug 31, 2017

Works fine :)

patch@dynamo:~$ jirb
irb(main):001:0> require 'syslog/logger'
=> true
irb(main):002:0> log = 'my_program'
=> #<Syslog::Logger:0x71ba6d4e @formatter=#<Syslog::Logger::Formatter:0x738dc9b>, @facility=8, @level=0>
irb(main):003:0> '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)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.