]> Entropealabs - wampex_router.git/commitdiff
add logging around RPC
authorChristopher Coté <chris@entropealabs.com>
Wed, 8 Dec 2021 19:11:21 +0000 (14:11 -0500)
committerChristopher Coté <chris@entropealabs.com>
Wed, 8 Dec 2021 19:11:21 +0000 (14:11 -0500)
lib/router/session.ex

index 33e018c69b59de234b3415f76c40aac1494a7997..acbe30c35938c210fa8002d471e8fb2437c25092 100644 (file)
@@ -459,6 +459,7 @@ defmodule Wampex.Router.Session do
               }
             )
 
+            Logger.info("Incoming Call - #{call_id} - #{proc} - #{inspect(Node.self())}")
             {sl, [{:next_event, :internal, :transition}]}
           else
             {:error, :no_live_callees} ->
@@ -521,7 +522,7 @@ defmodule Wampex.Router.Session do
           {%Result{request_id: call_id, arg_list: arg_l, arg_kw: arg_kw, details: opts}, pid}
         )
 
-        Logger.info("Yield: #{realm} - #{id}")
+        Logger.info("Yield: #{realm} - #{id} - #{inspect(Node.self())}")
 
       _ ->
         Logger.error("Unable to yield: #{id} not present in invocations: #{inspect(inv)}")
@@ -611,7 +612,7 @@ defmodule Wampex.Router.Session do
         %SL{data: %Sess{realm: realm, request_id: rid, transport: tt, transport_pid: t, invocations: inv}} = data
       ) do
     req_id = RealmSession.get_request_id(rid)
-    Logger.info("Call #{req_id}: #{realm} - #{e.details["procedure"]}")
+    Logger.info("Call #{req_id}: #{realm} - #{e.details["procedure"]} - #{inspect(Node.self())}")
     e = %Invocation{e | request_id: req_id}
     send_to_peer(Dealer.invocation(e), tt, t)
     {:ok, %SL{data | data: %Sess{data.data | request_id: req_id, invocations: [{call_id, e, from} | inv]}}, []}
@@ -640,6 +641,7 @@ defmodule Wampex.Router.Session do
 
   @impl true
   def handle_info(%Result{} = e, _, %SL{data: %Sess{transport: tt, transport_pid: t}} = data) do
+    Logger.info("Result - #{e.request_id} - #{inspect(Node.self())}")
     send_to_peer(Dealer.result(e), tt, t)
     {:ok, data, []}
   end