# File lib/log4r/outputter/udpoutputter.rb, line 18 18: def initialize(_name, hash={}) 19: super(_name, hash) 20: @host = (hash[:hostname] or hash["hostname"]) 21: @port = (hash[:port] or hash["port"]) 22: 23: begin 24: Logger.log_internal { 25: "UDPOutputter will send to #{@host}:#{@port}" 26: } 27: @udpsock = UDPSocket.new 28: @udpsock.connect( @host, @port ) 29: rescue Exception => e 30: Logger.log_internal(ERROR) { 31: "UDPOutputter failed to create UDP socket: #{e}" 32: } 33: Logger.log_internal {e} 34: self.level = OFF 35: raise e 36: end 37: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.