Class | ActiveSupport::BufferedLogger
In: | lib/active_support/buffered_logger.rb
Parent: | Object

Inspired by the buffered logger idea by Ezra

### Methods

add auto_flush auto_flushing= buffer clear_buffer close flush new silence

### Included Modules

Severity

### Classes and Modules

Module ActiveSupport::BufferedLogger::Severity

### Constants

MAX_BUFFER_SIZE | = | 1000

### Attributes

auto_flushing | [R] |
level | [RW] |

### Public Class methods

new(log, level = DEBUG)

### Public Instance methods

add(severity, message = nil, progname = nil, &block)
auto_flushing=(period)

Set the auto-flush period. Set to true to flush after every log message, to an integer to flush every N messages, or to false, nil, or zero to never auto-flush. If you turn auto-flushing off, be sure to regularly flush the log yourself — it will eat up memory until you do.

close()
flush()
silence(temporary_level = ERROR) {|self| ...}

Silences the logger for the duration of the block.

### Protected Instance methods

auto_flush()
buffer()
clear_buffer()

[Validate]