Class: Process::Naf::Logger::Base

Inherits:
Af::Application
  • Object
show all
Defined in:
app/models/process/naf/logger/base.rb

Direct Known Subclasses

JobLog, RunnerLog

Instance Method Summary collapse

Instance Method Details

#workObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/models/process/naf/logger/base.rb', line 4

def work
  log_file = ::Logical::Naf::LogFile.new(file_path)
  log_file.open

  while $stdin.gets
    begin
      log_file << $_.rstrip
    ensure
      log_file.write
    end
  end

  log_file.close
end