               {:error, :cant_start}
           end
         else
-          Logger.info("Not starting shallow rule #{inspect rule.name}. #{inspect rule} #{inspect trigger}")
+          Logger.info("Not starting shallow rule #{inspect rule.name}. ", service_id: rule.service, rule_id: rule.uuid)
           :ignore
         end
     end
   end
 
   def stop(uuid) do
-    Logger.info("Stop rule // #{uuid}", uuid: uuid)
+    Logger.info("Stop rule // #{uuid}", rule_id: uuid)
     case Serverboards.ProcessRegistry.pop(Serverboards.Rules.Registry, uuid) do
       nil -> :ok
       pid ->

  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

    default_params = get_default_params(%{ service: service, rule: uuid})
    params = Map.merge(params, default_params)

    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, rule_id: uuid, service_id: service)
        raise CantStartRule, message: to_string(desc)
    end

