     default_params = get_default_params(%{ service: service, rule: uuid})
     params = Map.merge(params, default_params)
 
-    Logger.info("Start rule with trigger #{inspect trigger}, #{uuid}", uuid: uuid, trigger: trigger, params: params, actions: actions)
+    Logger.info("Start rule with trigger #{inspect trigger}, #{uuid}", rule_id: uuid, trigger: trigger, params: params, actions: actions, service_id: service)
     [trigger] = Serverboards.Rules.Trigger.find(id: trigger)
     plugin_id = case Plugin.Runner.start trigger.command do
       {:ok, plugin_id} -> plugin_id
       {:error, desc} ->
-        Logger.error("Could not start trigger", description: desc)
+        Logger.error("Could not start trigger", description: desc, rule_id: uuid, service_id: service)
         raise CantStartRule, message: to_string(desc)
     end
 

  end
  def terminate(reason, %{ trigger: trigger, uuid: uuid, plugin_id: plugin_id } = state) do
    if reason != :normal do
      Logger.error("Terminate, stop plugin if possible #{trigger.trigger} // #{uuid}", uuid: uuid, rule: state.rule)
    end
    case Serverboards.ProcessRegistry.get(Serverboards.Rules.Registry, plugin_id) do
      nil -> :ok

    case Serverboards.ProcessRegistry.get(Serverboards.Rules.Registry, plugin_id) do
      nil ->
        if state.trigger.stop do
          Logger.info("Calling stop: #{plugin_id}.#{inspect state.trigger.stop}(#{inspect state.stop_id})", rule_id: rule.uuid, service_id: rule.service, rule: rule)
          case Plugin.Runner.call( plugin_id, state.trigger.stop, [state.stop_id] ) do
            {:ok, true} -> :ok
            res ->
              Logger.error("Error stopping rule #{inspect rule.uuid} when calling stop: #{inspect res}", rule_id: rule.uuid, service_id: rule.service, rule: rule, res: res)
          end
        else
          Logger.warn("Rule #{inspect rule.uuid} stop is not handled in any way. May need a stop method, or not be a singleton.", rrule_id: rule.uuid, service_id: rule.service, ule: rule)
        end
      pid ->
        Logger.info("Terminate rule, stopping plugin.", rule_id: rule.uuid, service_id: rule.service, rule: rule)
        Serverboards.Plugin.Runner.stop(pid)
    end
    :ok
