class method
self.new
Ruby on Rails 3.1.12
Since v2.3.18 Last seen in v4.2.9Signature
self.new(app, log = nil)
No documentation comment.
Parameters
-
appreq -
logopt = nil
Source
# File railties/lib/rails/rack/log_tailer.rb, line 4
def initialize(app, log = nil)
@app = app
path = Pathname.new(log || "#{File.expand_path(Rails.root)}/log/#{Rails.env}.log").cleanpath
@cursor = ::File.size(path)
@file = ::File.open(path, 'r')
end
Defined in railties/lib/rails/rack/log_tailer.rb line 4
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Rack::LogTailer