Module: Quickbooks::Util::Logging

Included in:
Service::BaseService
Defined in:
lib/quickbooks/util/logging.rb

Instance Method Summary collapse

Instance Method Details

#log(msg) ⇒ Object



4
5
6
# File 'lib/quickbooks/util/logging.rb', line 4

def log(msg)
  ::Quickbooks.log(msg)
end

#log_xml(str) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/quickbooks/util/logging.rb', line 8

def log_xml(str)
  if ::Quickbooks.log_xml_pretty_print? && !(str and str.empty?)
    Nokogiri::XML(str).to_xml
  else
    str
  end
rescue => e
  e
end