Methods

Logging::Appenders::Stdout

This class provides an Appender that can write to STDOUT.

Public Class Methods

new( name = 'stdout' ) click to toggle source
new( :layout => layout )
new( name = 'stdout', :level => 'info' )

Creates a new Stdout Appender. The name ‘stdout’ will be used unless another is given. Optionally, a layout can be given for the appender to use (otherwise a basic appender will be created) and a log level can be specified.

Options:

:layout   => the layout to use when formatting log events
:level    => the level at which to log
# File lib/logging/appenders/console.rb, line 32
def initialize( *args )
  opts = Hash === args.last ? args.pop : {}
  name = args.empty? ? 'stdout' : args.shift

  opts[:encoding] = STDOUT.external_encoding if STDOUT.respond_to? :external_encoding

  super(name, STDOUT, opts)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.