Class: Camayoc::Handlers::IO
- Includes:
- ThreadSafety
- Defined in:
- lib/camayoc/handlers/io.rb
Overview
Write to a raw IO stream with optional thread-safe locking before writing to the stream. By default, each stat message is written on a single line using puts. See the options in Camayoc::Handlers:Logger for options.
Instance Attribute Summary
Attributes inherited from Logger
Instance Method Summary collapse
-
#initialize(io = $stdout, options = {}, &block) ⇒ IO
constructor
A new instance of IO.
Methods included from ThreadSafety
#synchronize, #thread_safe=, #thread_safe?
Methods inherited from Logger
Constructor Details
#initialize(io = $stdout, options = {}, &block) ⇒ IO
Returns a new instance of IO.
11 12 13 14 |
# File 'lib/camayoc/handlers/io.rb', line 11 def initialize(io=$stdout,={},&block) super(io,{:method=>:puts}.merge(),&block) self.thread_safe = Camayoc.thread_safe? end |