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?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/quickbooks/util/logging.rb', line 8

def log?
  ::Quickbooks.log?
end

#log_xml(str) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/quickbooks/util/logging.rb', line 12

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