class Log4r::RemoteOutputter
See log4r/logserver.rb
Public Class Methods
new(_name, hash={})
click to toggle source
Calls superclass method
Log4r::Outputter.new
# File lib/log4r/outputter/remoteoutputter.rb, line 9 def initialize(_name, hash={}) super(_name, hash) @uri = (hash[:uri] or hash['uri']) @buffsize = (hash[:buffsize] or hash['buffsize'] or 1).to_i @buff = [] connect end
Public Instance Methods
flush()
click to toggle source
Call flush to send any remaining LogEvents to the remote server.
# File lib/log4r/outputter/remoteoutputter.rb, line 27 def flush synch { send_buffer } end
Private Instance Methods
canonical_log(logevent)
click to toggle source
# File lib/log4r/outputter/remoteoutputter.rb, line 33 def canonical_log(logevent) synch { @buff.push logevent send_buffer if @buff.size >= @buffsize } end