class EaseEngine::Log::RotateFile

Attributes

max_size[RW]

Public Class Methods

new( file, flags = FLAG_ALL, max_size = 1024 * 1024 ) click to toggle source
Calls superclass method EaseEngine::Log::IO::new
# File lib/ease_engine/log.rb, line 33
def initialize( file, flags = FLAG_ALL, max_size = 1024 * 1024 )
  super( file, flags )
  
  @max_size = max_size
end

Public Instance Methods

rotate( file_path ) click to toggle source
# File lib/ease_engine/log.rb, line 39
def rotate( file_path )
  @file.rewind
  FileUtils.copy_stream( @file, file_path )
  @file.truncate( 0 )
end