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

Setting integer based log levels fails #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Setting integer based log levels fails #23

wants to merge 1 commit into from

Conversation

simmel
Copy link

@simmel simmel commented Oct 8, 2014

I'm writing an Logstash (SOAP) plugin which one of the libs (savon) supports using another logger for debug log.
When I set it to use @logger in logstash (i.e. cabin) it stackstraced because the savon set the log level with an integer, e.g. the Logger::WARN contant.

[…]
The error reported is:
  undefined method `to_sym' for 0:Fixnum
/Users/simlu/code/logstash/vendor/bundle/jruby/1.9/gems/cabin-0.6.1/lib/cabin/mixins/logger.rb:23:in `level='
/Users/simlu/code/logstash/vendor/bundle/jruby/1.9/gems/savon-2.7.2/lib/savon/options.rb:204:in `log_level'
/Users/simlu/code/logstash/vendor/bundle/jruby/1.9/gems/savon-2.7.2/lib/savon/options.rb:102:in `initialize'
/Users/simlu/code/logstash/vendor/bundle/jruby/1.9/gems/savon-2.7.2/lib/savon/client.rb:47:in `set_globals'
/Users/simlu/code/logstash/vendor/bundle/jruby/1.9/gems/savon-2.7.2/lib/savon/client.rb:15:in `initialize'
/Users/simlu/code/logstash/vendor/bundle/jruby/1.9/gems/savon-2.7.2/lib/savon.rb:10:in `client'
/Users/simlu/code/logstash/lib/logstash/outputs/soap.rb:38:in `register'
org/jruby/RubyArray.java:1613:in `each'
/Users/simlu/code/logstash/lib/logstash/pipeline.rb:158:in `start_outputs'
/Users/simlu/code/logstash/lib/logstash/pipeline.rb:79:in `run'
/Users/simlu/code/logstash/lib/logstash/agent.rb:139:in `execute'
/Users/simlu/code/logstash/lib/logstash/runner.rb:153:in `run'
org/jruby/RubyProc.java:271:in `call'
/Users/simlu/code/logstash/lib/logstash/runner.rb:158:in `run'
org/jruby/RubyProc.java:271:in `call'
/Users/simlu/code/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.17/lib/stud/task.rb:12:in `initialize'

This pull request fixes this.

@simmel
Copy link
Author

simmel commented Oct 8, 2014

Oh and this patch is Ruby +1.9 only. Is this an issue?

@jordansissel
Copy link
Owner

Do the integer levels in savon match what cabin has?

@simmel
Copy link
Author

simmel commented Oct 8, 2014

Yes, it uses the Ruby Logger ones IIRC.

@simmel
Copy link
Author

simmel commented May 11, 2015

Any progress @jordansissel ?

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.

2 participants