Class: Tail::LogsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Tail::LogsController
- Defined in:
- app/controllers/tail/logs_controller.rb
Instance Attribute Summary collapse
-
#web_logger ⇒ Object
readonly
Returns the value of attribute web_logger.
Instance Method Summary collapse
Instance Attribute Details
#web_logger ⇒ Object (readonly)
Returns the value of attribute web_logger.
6 7 8 |
# File 'app/controllers/tail/logs_controller.rb', line 6 def web_logger @web_logger end |
Instance Method Details
#flush ⇒ Object
24 25 26 27 28 |
# File 'app/controllers/tail/logs_controller.rb', line 24 def flush web_logger ||= Tail::Log.instance web_logger.flush(params[:file_name]) redirect_to action: :index end |
#grep ⇒ Object
12 13 14 15 |
# File 'app/controllers/tail/logs_controller.rb', line 12 def grep @files = tail render '_main' end |
#index ⇒ Object
8 9 10 |
# File 'app/controllers/tail/logs_controller.rb', line 8 def index @files = tail end |