Class: Logy::Viewer

Inherits:
Object
  • Object
show all
Defined in:
app/services/logy/viewer.rb

Constant Summary collapse

LOG_PATH =
"#{Rails.application.config.logs_path}/"

Class Method Summary collapse

Class Method Details

.call(file_name) ⇒ Object



5
6
7
8
9
10
11
12
# File 'app/services/logy/viewer.rb', line 5

def self.call(file_name)
  file = LOG_PATH + (file_name + '.log')
  if File.exist? file
    File.open(file)
  else
    File.open(file, "w") {}
  end
end