lib/logging.rb
# Log to STDOUT and Log file and FATAL class message then exit the application
# with a return code.
# fatal retrieve the caller list of functions and save it to the log file if
# the exception class is given.
# The exception class should provide message and backtrace.
Log to STDOUT and Log file and FATAL class message then exit the application
with a return code.
fatal retrieve the caller list of functions and save it to the log file if
the exception class is given.
The exception class should provide message and backtrace.
Log to STDOUT and Log file and FATAL class message then exit the application with a return code . fatal retrieve the caller list of functions and save it to the log file if the exception class is given . The exception class should provide message and backtrace .
def fatal(rc, message, *p)
    if p.length > 0 && p[-1].is_a?(Exception)
      e = p[-1]
      p.pop
      message = format("%s\n%s\n%s", message, e.message, e.backtrace.join("\n"))
    end
    log_object.fatal(format(message, *p))
    puts format('Issues found. Please fix it and retry. Process aborted. '\
         "See details in log file '%s'.", PrcLib.log_file)
    exit rc
  end
def fatal ( rc , message , * p ) if p . length > 0 && p [ - 1 ] . is_a? ( Exception ) e = p [ - 1 ] p . pop message = format ( "%s\n%s\n%s" , message , e . message , e . backtrace . join ( "\n" ) ) end log_object . fatal ( format ( message , * p ) ) puts format ( 'Issues found. Please fix it and retry. Process aborted. ' "See details in log file '%s'." , PrcLib . log_file ) exit rc end
Log to STDOUT and Log file and FATAL class message then exit the application
with a return code.
Log to STDOUT and Log file and FATAL class message then exit the application with a return code .
rc
<not_specific>
message
<not_specific>
p
<not_specific>