Class: Rails::Pretty::Logger::HourlyLogsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rails/pretty/logger/hourly_logs_controller.rb

Instance Method Summary collapse

Instance Method Details

#clear_logsObject



15
16
17
18
# File 'app/controllers/rails/pretty/logger/hourly_logs_controller.rb', line 15

def clear_logs
  @log.clear_logs
  redirect_to hourly_logs_path({log_file: params[:log_file]})
end

#indexObject



11
12
13
# File 'app/controllers/rails/pretty/logger/hourly_logs_controller.rb', line 11

def index
  @log_file_list = PrettyLogger.get_hourly_log_file_list.select{ |_,file| file[:file_size] > 0 }
end

#logsObject



7
8
9
# File 'app/controllers/rails/pretty/logger/hourly_logs_controller.rb', line 7

def logs
  @log_data = @log.log_data
end