Class: Log4r::ScribeOutputter
- Defined in:
- lib/log4r-color/outputter/scribeoutputter.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Attributes inherited from Outputter
#colors, #formatter, #level, #name
Instance Method Summary collapse
-
#initialize(_name, hash = {}) ⇒ ScribeOutputter
constructor
A new instance of ScribeOutputter.
Methods inherited from Outputter
[], []=, color, each, each_outputter, #flush, #level_key, #only_at, stderr, stdout
Constructor Details
#initialize(_name, hash = {}) ⇒ ScribeOutputter
Returns a new instance of ScribeOutputter.
12 13 14 15 16 17 18 19 |
# File 'lib/log4r-color/outputter/scribeoutputter.rb', line 12 def initialize(_name, hash={}) super(_name, hash) @host = (hash[:host] or hash[:host] or 'localhost') @port = (hash[:port] or hash[:port] or '1463') @category = (hash[:category] or hash[:category] or 'default') @client = Scribe.new("#{@host}:#{@port}", category=@category, add_newlines=false) end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
10 11 12 |
# File 'lib/log4r-color/outputter/scribeoutputter.rb', line 10 def category @category end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
10 11 12 |
# File 'lib/log4r-color/outputter/scribeoutputter.rb', line 10 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
10 11 12 |
# File 'lib/log4r-color/outputter/scribeoutputter.rb', line 10 def port @port end |