Class: BotMob::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/bot_mob/logger.rb

Overview

# BotMob::Logger

Wrapper for the logger implemented by BotMob

Constant Summary collapse

OMITTED_PARAMS =
%w(splat captures).freeze

Instance Method Summary collapse

Instance Method Details

#log_request(source, action = :request, params = {}) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/bot_mob/logger.rb', line 8

def log_request(source, action = :request, params = {})
  source_network = params[:network] || 'roaming'
  ts = Time.now.strftime('%Y-%m-%d %H:%M:%S%Z')

  info "\n#{source.name} received #{action} from :#{source_network} at #{ts}"
  info "Parameters: #{logged_params(params).inspect}"
end