def log_action(request_id, user_id, login, action, success = true, description = "")
log_level = success ? Logger::DEBUG : Logger::ERROR
action_logger = get_action_logger()
if not action_logger.nil?
result = success ? "SUCCESS" : "FAILURE"
time_obj = Time.new
date = time_obj.strftime("%Y-%m-%d")
time = time_obj.strftime("%H:%M:%S")
action_logger.info("#{result} DATE=#{date} TIME=#{time} ACTION=#{action} REQ_ID=#{request_id} USER_ID=#{user_id} LOGIN=#{login} #{description}")
end
Rails.logger.add(log_level) {"[REQ_ID=#{request_id}] ACTION=#{action} #{description}"}
end