class Centralpos::Core::Logger
Attributes
log[RW]
log_level[RW]
pretty_print_xml[RW]
Public Class Methods
new(opts = {})
click to toggle source
Receives a hash with keys `log`, `pretty_print_xml` and `log_level`. `log_level` can be :info, :debug, :warn, :error or :fatal
@param opts [Hash] @option opts [Boolean] :log @option opts [Boolean] :pretty_print_xml @option opts [Symbol] :log_level
# File lib/centralpos/core/logger.rb, line 13 def initialize(opts = {}) @log = opts[:log] || false @pretty_print_xml = opts[:pretty_print_xml] || false @log_level = opts[:log_level] || :info end
options()
click to toggle source
# File lib/centralpos/core/logger.rb, line 30 def self.options @logger ||= Centralpos::Core::Logger.new @logger.logger_options end
options=(opts = {})
click to toggle source
# File lib/centralpos/core/logger.rb, line 26 def self.options=(opts = {}) @logger = Centralpos::Core::Logger.new(opts) end
Public Instance Methods
logger_options()
click to toggle source
Returns a hash with the logging options for Savon.
@return [Hash]
# File lib/centralpos/core/logger.rb, line 22 def logger_options { log: log, pretty_print_xml: pretty_print_xml, log_level: log_level } end