Class: ForemanAnsibleDirector::Logging::ActionLogger
- Inherits:
-
Object
- Object
- ForemanAnsibleDirector::Logging::ActionLogger
- Defined in:
- app/services/foreman_ansible_director/logging/action_logger.rb
Class Method Summary collapse
Class Method Details
.log_trigger(action_class:, task_args:, mode:) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/services/foreman_ansible_director/logging/action_logger.rb', line 11 def log_trigger(action_class:, task_args:, mode:) base_msg = "[TRIGGER (#{mode.to_s.upcase})] #{action_class.name}" logger.info(base_msg) return if Rails.env.production? debug_msg = if task_args.empty? base_msg.to_s else "#{base_msg} | task_args: #{task_args.inspect}" end logger.debug(debug_msg) end |
.logger ⇒ Object
7 8 9 |
# File 'app/services/foreman_ansible_director/logging/action_logger.rb', line 7 def logger ::Foreman::Logging.logger("#{::ForemanAnsibleDirector::Constants::PLUGIN_NAME}/action") end |