Sha256: f80cf6369ee66e938c2a6cde9d1158571d861d60102b6c353e2e5106f220a0fe

Contents?: true

Size: 985 Bytes

Versions: 2

Compression:

Stored size: 985 Bytes

Contents

# $Id$

require Logging.libpath(*%w[logging appenders io])

module Logging::Appenders

  # This class provides an Appender that can write to STDOUT.
  #
  class Stdout < ::Logging::Appenders::IO

    # call-seq:
    #    Stdout.new
    #    Stdout.new( :layout => layout )
    #
    # Creates a new Stdout Appender. The name 'stdout' will always be used
    # for this appender.
    #
    def initialize( name = nil, opts = {} )
      name ||= 'stdout'
      super(name, STDOUT, opts)
    end
  end  # class Stdout

  # This class provides an Appender that can write to STDERR.
  #
  class Stderr < ::Logging::Appenders::IO

    # call-seq:
    #    Stderr.new
    #    Stderr.new( :layout => layout )
    #
    # Creates a new Stderr Appender. The name 'stderr' will always be used
    # for this appender.
    #
    def initialize( name = nil, opts = {} )
      name ||= 'stderr'
      super(name, STDERR, opts)
    end
  end  # class Stderr

end  # module Logging::Appenders

# EOF

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
filterfish-logging-0.9.8 lib/logging/appenders/console.rb
logging-0.8.0 lib/logging/appenders/console.rb