Class: LogUtils

Inherits:
Object
  • Object
show all
Defined in:
lib/ec2/amitools/util.rb

Overview

Utilities used for logging (in order for compatability between AESLogger and the previous Log class)

Class Method Summary collapse

Class Method Details

.exception_str(e) ⇒ Object



513
514
515
# File 'lib/ec2/amitools/util.rb', line 513

def LogUtils.exception_str(e)
  e.message + "\n" + e.backtrace.to_s
end

.xmlrpcfault_str(xmlrpc_method, fault) ⇒ Object



517
518
519
# File 'lib/ec2/amitools/util.rb', line 517

def LogUtils.xmlrpcfault_str(xmlrpc_method, fault)
  "XML-RPC method fault : method: #{xmlrpc_method} : fault code: #{fault.faultCode} : fault string: #{fault.faultString}"
end

.xmlrpcmethod_call_str(name, *paramstructs) ⇒ Object



521
522
523
524
525
# File 'lib/ec2/amitools/util.rb', line 521

def LogUtils.xmlrpcmethod_call_str(name, *paramstructs)
  msg = "name: #{name} : "
  paramstructs.each_index { |i| msg += "parameter #{i + 1}: #{paramstructs[i].inspect} : " }
  "XML-RPC method call\n#{msg}"
end

.xmlrpcmethod_return_str(name, value) ⇒ Object



527
528
529
530
# File 'lib/ec2/amitools/util.rb', line 527

def LogUtils.xmlrpcmethod_return_str(name, value)
  msg = "name: #{name} : value: #{value.inspect}"
   "XML-RPC method return : #{msg}"
end