Method: HBase.log4j=
- Defined in:
- lib/hbase-jruby/hbase.rb
.HBase.log4j=(filename) ⇒ String .HBase.log4j=(hash) ⇒ Hash .HBase.log4j=(props) ⇒ java.util.Properties
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/hbase-jruby/hbase.rb', line 30 def self.log4j= arg if arg.is_a?(Hash) props = java.util.Properties.new arg.each do |k, v| props.setProperty k.to_s, v.to_s end org.apache.log4j.PropertyConfigurator.configure props else case File.extname(arg).downcase when '.xml' org.apache.log4j.xml.DOMConfigurator.configure arg else org.apache.log4j.PropertyConfigurator.configure arg end end end |