-
Notifications
You must be signed in to change notification settings - Fork 75
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
Zookeeper logger throws exception on Windows/JRuby #16
Comments
D'oh, i knew this day would come. I do zero windows testing, so YMMV. I'll fix this to use stderr instead and push a new build. |
BTW, if you are using zookeeper for application development, you might want to look at ZK which is a higher-level wrapper around this library, and provides a much nicer API for registering for events, cluster-wide locks, and so forth. |
I will be looking at ZK for coding. This was instigated by my first attempt at DCell, had no idea what dependencies would be pulled in :-) Thanks for the quick response. |
Hey, I've pushed a release of It's a little confusing, as twitter just gave me this repo, but we should have it all worked out soon :) |
ok, pushed Have a look and let me know if that fixes it for you :) |
Sorry I haven't tried this out yet, busy at home and work. I'm using Jruby,Sinatra,Celluloid and thought I'd be using the DCell extension of Celluloid. Anyway the current task is handled by Ruby/0mq binding support in Celluloid. When the current work project is in delivered I'll try this out. I have plans for using Zookeeper with DCell in the future. |
Cool, sounds good :) |
I don't know if there is a way to set the logger, but with JRuby on windows I get an exception the following Logger.new:
lib\ruby\gems\1.8\gems\slyphon-zookeeper-0.9.2-java\lib\zookeeper.rb
class Zookeeper < ZookeeperBase
unless defined?(@@logger)
@@logger = Logger.new('/dev/null').tap { |l| l.level = Logger::FATAL } # UNIX: FOR GREAT JUSTICE !!
end
$ jruby -v
jruby 1.6.7 (ruby-1.9.2-p312) (2012-02-22 3e82bc8) (Java HotSpot(TM) Client VM 1.6.0_31) [Windows Server 2008 R2-x86-java]
Exception outpout:
Errno::ENOENT: No such file or directory - c:/dev/null
initialize at org/jruby/RubyFile.java:465
open at org/jruby/RubyIO.java:1135
open at org/jruby/RubyKernel.java:287
open at org/jruby/RubyKernel.java:297
create_logfile at c:/jruby/jruby-1.6.7/lib/ruby/1.9/logger.rb:549
open_logfile at c:/jruby/jruby-1.6.7/lib/ruby/1.9/logger.rb:544
initialize at c:/jruby/jruby-1.6.7/lib/ruby/1.9/logger.rb:499
initialize at c:/jruby/jruby-1.6.7/lib/ruby/1.9/logger.rb:275
Zookeeper at c:/jruby/jruby-1.6.7/lib/ruby/gems/1.8/gems/slyphon-zookeepe
r-0.9.2-java/lib/zookeeper.rb:26
(root) at c:/jruby/jruby-1.6.7/lib/ruby/gems/1.8/gems/slyphon-zookeepe
r-0.9.2-java/lib/zookeeper.rb:24
require at org/jruby/RubyKernel.java:1042
(root) at c:/jruby/jruby-1.6.7/lib/ruby/gems/1.8/gems/slyphon-zookeepe
r-0.9.2-java/lib/zookeeper.rb:7
The text was updated successfully, but these errors were encountered: