Class: Log4r::IOOutputter

### Home Classes Methods

### In Files

- lib/log4r/outputter/iooutputter.rb

### Parent

Outputter

### Methods

- ::new
- #close
- #closed?

### Files

- GDC
- MDC
- NDC
- configurator
- emailoutputter
- formatter
- log4jxmlformatter
- log4r
- logger
- logserver
- outputter
- patternformatter
- scribeoutputter
- syslogoutputter
- win32eventoutputter
- yamlconfigurator

### Class/Module Index

Quicksearch

- Log4r
- Log4r::BasicFormatter
- Log4r::ConfigError
- Log4r::Configurator
- Log4r::DateFileOutputter
- Log4r::DefaultFormatter
- Log4r::EmailOutputter
- Log4r::FileOutputter
- Log4r::Formatter
- Log4r::GDC
- Log4r::IOOutputter
- Log4r::Log4jXmlFormatter
- Log4r::Log4rTools
- Log4r::LogEvent
- Log4r::LogServer
- Log4r::Logger
- Log4r::MDC
- Log4r::NDC
- Log4r::ObjectFormatter
- Log4r::Outputter
- Log4r::PatternFormatter
- Log4r::RemoteOutputter
- Log4r::RollingFileOutputter
- Log4r::RootLogger
- Log4r::ScribeOutputter
- Log4r::SimpleFormatter
- Log4r::StderrOutputter
- Log4r::StdoutOutputter
- Log4r::SyslogOutputter
- Log4r::UDPOutputter
- Log4r::YamlConfigurator
- REXML
- Object

No matching classes.

# Log4r::IOOutputter

IO Outputter invokes print then flush on the wrapped IO object. If the IO stream dies, IOOutputter sets itself to OFF and the system continues on its merry way.

To find out why an IO stream died, create a logger named 'log4r' and look at the output.

### Public Class Methods

new(_name, _out, hash={}) click to toggle source

IOOutputter needs an IO object to write to.

    # File lib/log4r/outputter/iooutputter.rb, line 18
    def initialize(_name, _out, hash={})
      super(_name, hash)
      @out = _out
    end

### Public Instance Methods

close() click to toggle source

Close the IO and sets level to OFF

    # File lib/log4r/outputter/iooutputter.rb, line 28
    def close
      @out.close unless @out.nil?
      @level = OFF
      OutputterFactory.create_methods(self)
      Logger.log_internal {"Outputter '#{@name}' closed IO and set to OFF"}
    end

closed?() click to toggle source

    # File lib/log4r/outputter/iooutputter.rb, line 23
    def closed?
      @out.closed?
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.