Methods
C
N
T
Class Public methods
new(app, log = nil)
    # File railties/lib/rails/rack/log_tailer.rb, line 4
 4:       def initialize(app, log = nil)
 5:         @app = app
 6: 
 7:         path = Pathname.new(log || "#{::File.expand_path(Rails.root)}/log/#{Rails.env}.log").cleanpath
 8: 
 9:         @cursor = @file = nil
10:         if ::File.exists?(path)
11:           @cursor = ::File.size(path)
12:           @file = ::File.open(path, 'r')
13:         end
14:       end
Instance Public methods
call(env)
    # File railties/lib/rails/rack/log_tailer.rb, line 16
16:       def call(env)
17:         response = @app.call(env)
18:         tail!
19:         response
20:       end
tail!()
    # File railties/lib/rails/rack/log_tailer.rb, line 22
22:       def tail!
23:         return unless @cursor
24:         @file.seek @cursor
25: 
26:         unless @file.eof?
27:           contents = @file.read
28:           @cursor = @file.tell
29:           $stdout.print contents
30:         end
31:       end