Sha256: 148bee0a5f370384c6b36a68b94ad5465fa97e1b68ac701d8b114fdbd6e0c406

Contents?: true

Size: 984 Bytes

Versions: 1

Compression:

Stored size: 984 Bytes

Contents

# $Id: console.rb 2 2007-01-09 18:10:50Z tim_pease $

require 'logging/appenders/io'

module Logging
module 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( opts = {} )
      super('stdout', 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( opts = {} )
      super('stderr', STDERR, opts)
    end
  end  # class StdErr

end  # module Appenders
end  # module Logging

# EOF

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
logging-0.1.0 lib/logging/appenders/console.rb