Module: Cuboid::UI::OutputInterface::ErrorLogging
- Included in:
- Cuboid::UI::OutputInterface
- Defined in:
- lib/cuboid/ui/output_interface/error_logging.rb
Overview
Class Method Summary collapse
Instance Method Summary collapse
-
#error_logfile ⇒ String
Location of the error log file.
- #has_error_log? ⇒ Boolean
- #set_error_logfile(logfile) ⇒ Object
Class Method Details
.initialize ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/cuboid/ui/output_interface/error_logging.rb', line 8 def self.initialize @@error_log_written_env = false @@error_fd ||= nil begin @@error_fd.close if @@error_fd rescue IOError end @@error_fd = nil @@error_buffer = [] @@error_logfile = "#{Cuboid::Options.paths.logs}error-#{Process.pid}.log" end |
Instance Method Details
#error_logfile ⇒ String
Returns Location of the error log file.
30 31 32 |
# File 'lib/cuboid/ui/output_interface/error_logging.rb', line 30 def error_logfile @@error_logfile end |
#has_error_log? ⇒ Boolean
34 35 36 |
# File 'lib/cuboid/ui/output_interface/error_logging.rb', line 34 def has_error_log? File.exist? error_logfile end |
#set_error_logfile(logfile) ⇒ Object
24 25 26 |
# File 'lib/cuboid/ui/output_interface/error_logging.rb', line 24 def set_error_logfile( logfile ) @@error_logfile = logfile end |