anchor.diff:  
   code_change(_OldVsn, State, _Extra) ->
     {ok, State}.
  +
  +format_status(_Opt, [_PDict, State0]) ->
  +  State = lists:zip(record_info(fields, state), tl(tuple_to_list(State0))),
  +  [{data, [{"State", State}]}].
   
   %%%_* Internal functions -------------------------------------------------------
   handle_produce(From, Topic, Partition, Key, Value, State0) ->
  
positive.code:   erlang:send(Pid, {produce, From, Topic, Partition, Key, Value}),
    {ok, Ref}.
  
  -spec debug(pid(), list()) -> ok.
  %% @doc Enable/disabling debugging on brod_producer and on all connections
  %%      to brokers managed by the given brod_producer instance.
  %%      Enable:
  %%        brod_producer:debug(Conn, {log, print}).
  %%        brod_producer:debug(Conn, {trace, true}).
  %%      Disable:
  %%        brod_producer:debug(Conn, no_debug).
  debug(Pid, Debug) ->
    {ok, Sockets} = get_sockets(Pid),
    lists:foreach(
      fun(#socket{pid = SocketPid}) ->
          {ok, _} = gen:call(SocketPid, system, {debug, Debug})
      end, Sockets),
    {ok, _} = gen:call(Pid, system, {debug, Debug}),
    ok.
  
  -spec get_sockets(pid()) -> {ok, [#socket{}]}.
  get_sockets(Pid) ->
  
negative.code: 
  %% Debug API
  -export([ debug/2
          , no_debug/1
          , get_sockets/1
          ]).
  
  