Writes unstructured messages to (presumed) fast output streams such as $stdout. Hoodoo::Logger::FastWriter subclass. See also Hoodoo::Logger.

Methods
N
R
Included Modules
Class Public methods
new( output_stream = $stdout )

Create a stream writer instance. Although you could initialize this class with a slow output stream, they're expected to be fast (e.g. terminal output) as this is a Hoodoo::Logger::FastWriter subclass.

For reliable file writing, use the Hoodoo::Logger::FileWriter class instead.

output_stream

Optional I/O stream instance; default is +$stdout+. The instance must provide a puts implementation.

# File lib/hoodoo/logger/writers/stream_writer.rb, line 32
def initialize( output_stream = $stdout )
  @output_stream = output_stream
end
Instance Public methods
report( log_level, component, code, data )
# File lib/hoodoo/logger/writers/stream_writer.rb, line 38
def report( log_level, component, code, data )
  @output_stream.puts( flatten( log_level, component, code, data ) )
end