Class Logging::Appenders::StringIo
In: lib/logging/appenders/string_io.rb
Parent: ::Logging::Appenders::IO

This class provides an Appender that can write to a StringIO instance. This is very useful for testing log message output.

Methods

clear   new   reopen   reset  

Attributes

sio  [R]  The StringIO instance the appender is writing to.

Public Class methods

Creates a new StrinIo appender that will append log messages to a StringIO instance.

Public Instance methods

Clears the internal StringIO instance. All log messages are removed from the buffer.

Reopen the underlying StringIO instance. If the instance is currently closed then it will be opened. If the instance is currently open then it will be closed and immediately opened.

reset()

Alias for clear

[Validate]