Module: Logs::ApplicationHelper
- Included in:
- LogsController
- Defined in:
- app/helpers/logs/application_helper.rb
Instance Method Summary collapse
- #download_log_path(log_name) ⇒ Object
- #lines(file_path_name) ⇒ Object
- #log_file ⇒ Object
- #log_file_path(log_name) ⇒ Object
- #tail_log_path(log_name) ⇒ Object
Instance Method Details
#download_log_path(log_name) ⇒ Object
11 12 13 |
# File 'app/helpers/logs/application_helper.rb', line 11 def download_log_path(log_name) download_path + "?f=" + log_name end |
#lines(file_path_name) ⇒ Object
19 20 21 |
# File 'app/helpers/logs/application_helper.rb', line 19 def lines(file_path_name) `cat #{ file_path_name } | wc -l`.to_s end |
#log_file ⇒ Object
3 4 5 |
# File 'app/helpers/logs/application_helper.rb', line 3 def log_file (params[:name] || Rails.env) + '.log' end |
#log_file_path(log_name) ⇒ Object
7 8 9 |
# File 'app/helpers/logs/application_helper.rb', line 7 def log_file_path(log_name) root_path + log_name end |
#tail_log_path(log_name) ⇒ Object
15 16 17 |
# File 'app/helpers/logs/application_helper.rb', line 15 def tail_log_path(log_name) tail_path + "?f=" + log_name end |