# File lib/log4r/outputter/scribeoutputter.rb, line 12 12: def initialize(_name, hash={}) 13: super(_name, hash) 14: @host = (hash[:host] or hash[:host] or 'localhost') 15: @port = (hash[:port] or hash[:port] or '1463') 16: @category = (hash[:category] or hash[:category] or 'default') 17: 18: @client = Scribe.new("#{@host}:#{@port}", category=@category, add_newlines=false) 19: end
# File lib/log4r/outputter/scribeoutputter.rb, line 23 23: def write(data) 24: begin 25: @client.log(data.strip, @category) 26: rescue ScribeThrift::Client::TransportException => e 27: Logger.log_internal(2) { 28: "Caught TransportException, is the scribe server alive?" 29: } 30: rescue ThriftClient::NoServersAvailable => e 31: Logger.log_internal(2) { 32: "No scribe servers are available!" 33: } 34: end 35: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.