Module: Logging::Appenders

### Home Classes Methods

### In Files

- lib/logging/appenders.rb
- lib/logging/appenders/buffering.rb
- lib/logging/appenders/console.rb
- lib/logging/appenders/file.rb
- lib/logging/appenders/io.rb
- lib/logging/appenders/rolling_file.rb
- lib/logging/appenders/string_io.rb
- lib/logging/appenders/syslog.rb

### Namespace

- MODULE Logging::Appenders::Buffering
- CLASS Logging::Appenders::File
- CLASS Logging::Appenders::IO
- CLASS Logging::Appenders::RollingFile
- CLASS Logging::Appenders::Stderr
- CLASS Logging::Appenders::Stdout
- CLASS Logging::Appenders::StringIo
- CLASS Logging::Appenders::Syslog

### Methods

- ::file
- ::io
- ::rolling_file
- ::stderr
- ::stdout
- ::string_io
- ::syslog
- #[]
- #[]=
- #each
- #remove

### Files

- History.txt

### Class/Module Index

Quicksearch

- Logging
- Logging::Appender
- Logging::Appenders
- Logging::Appenders::Buffering
- Logging::Appenders::File
- Logging::Appenders::IO
- Logging::Appenders::RollingFile
- Logging::Appenders::RollingFile::Roller
- Logging::Appenders::Stderr
- Logging::Appenders::Stdout
- Logging::Appenders::StringIo
- Logging::Appenders::Syslog
- Logging::ColorScheme
- Logging::Filter
- Logging::Filters
- Logging::Filters::Level
- Logging::Layout
- Logging::Layouts
- Logging::Layouts::Basic
- Logging::Layouts::Parseable
- Logging::Layouts::Pattern
- Logging::Logger
- Logging::MappedDiagnosticContext
- Logging::NestedDiagnosticContext
- Logging::Proxy
- Logging::RailsCompat
- Logging::Repository
- Logging::Repository::Singleton
- Logging::RootLogger
- RSpec
- RSpec::Core
- RSpec::Core::Configuration
- RSpec::LoggingHelper
- RSpec::LoggingHelper
- Spec
- Spec::Runner
- Spec::Runner::Configuration
- Object
- Object::LoggingHelper
- File
- FileUtils
- Module
- ReentrantMutex
- String

No matching classes.

# Logging::Appenders

### Public Class Methods

file( *args ) click to toggle source

Accessor / Factory for the File appender.

    # File lib/logging/appenders/file.rb, line 6
    def self.file( *args )
      return ::Logging::Appenders::File if args.empty?
      ::Logging::Appenders::File.new(*args)
    end

io( *args ) click to toggle source

Accessor / Factory for the IO appender.

    # File lib/logging/appenders/io.rb, line 6
    def self.io( *args )
      return ::Logging::Appenders::IO if args.empty?
      ::Logging::Appenders::IO.new(*args)
    end

rolling_file( *args ) click to toggle source

Accessor / Factory for the RollingFile appender.

    # File lib/logging/appenders/rolling_file.rb, line 4
    def self.rolling_file( *args )
      return ::Logging::Appenders::RollingFile if args.empty?
      ::Logging::Appenders::RollingFile.new(*args)
    end

stderr( *args ) click to toggle source

Accessor / Factory for the Stderr appender.

    # File lib/logging/appenders/console.rb, line 45
    def self.stderr( *args )
      if args.empty?
        return self['stderr'] || ::Logging::Appenders::Stderr.new
      end
      ::Logging::Appenders::Stderr.new(*args)
    end

stdout( *args ) click to toggle source

Accessor / Factory for the Stdout appender.

    # File lib/logging/appenders/console.rb, line 6
    def self.stdout( *args )
      if args.empty?
        return self['stdout'] || ::Logging::Appenders::Stdout.new
      end
      ::Logging::Appenders::Stdout.new(*args)
    end

string_io( *args ) click to toggle source

Accessor / Factory for the StringIo appender.

    # File lib/logging/appenders/string_io.rb, line 6
    def self.string_io( *args )
      return ::Logging::Appenders::StringIo if args.empty?
      ::Logging::Appenders::StringIo.new(*args)
    end

syslog( *args ) click to toggle source

Accessor / Factory for the Syslog appender.

    # File lib/logging/appenders/syslog.rb, line 11
    def self.syslog( *args )
      return ::Logging::Appenders::Syslog if args.empty?
      ::Logging::Appenders::Syslog.new(*args)
    end

### Public Instance Methods

Appenders[name] click to toggle source

Returns the appender instance stored in the appender hash under the key name, or `nil` if no appender has been created using that name.

    # File lib/logging/appenders.rb, line 11
    def []( name ) @appenders[name] end

Appenders[name] = appender click to toggle source

Stores the given appender instance in the appender hash under the key name.

    # File lib/logging/appenders.rb, line 19
    def []=( name, value ) @appenders[name] = value end

each {|appender| block} click to toggle source

Yield each appender to the block.

    # File lib/logging/appenders.rb, line 34
    def each( &block )
      @appenders.values.each(&block)
      return nil
    end

remove( name ) click to toggle source

Removes the appender instance stored in the appender hash under the key name.

    # File lib/logging/appenders.rb, line 27
    def remove( name ) @appenders.delete(name) end

[Validate]

Generated with the Darkfish Rdoc Generator 2.