Method: Padrino::Logger#flush
- Defined in:
- padrino-core/lib/padrino-core/logger.rb
#flush ⇒ Object
Flush the entire buffer to the log object.
431 432 433 434 435 436 437 438 439 440 |
# File 'padrino-core/lib/padrino-core/logger.rb', line 431 def flush return unless @buffer.size > 0 @@mutex.synchronize do @buffer.each do |line| line.encode!(@sanitize_encoding, :invalid => :replace, :undef => :replace) if @sanitize_encoding @log.write(line) end @buffer.clear end end |