There is a very useful error log that prints if I don’t recuse an exception from within a GenServer.
GenServer {[GENSERVER NAME HERE]} terminating
...
Last message (from #PID[PID HERE]): [ARGS TO THE HANDLE CALL HERE]
State: [GENSERVER STATE HERE]
I’ve dug around the elixir code base but can’t find how {'** Generic server ' ++ _, [name, last, state, reason | client]}
is getting set in elixir/lib/logger/lib/logger.ex
. Most importantly I want last
(which is [ARGS TO THE HANDLE CALL HERE]
) for my own logging purposes. Hoping someone has a way to access this in the recuse block of a try and not an answer that involves somehow storing the message args from the handle_call
function…