anchor.diff:  populate_token_channel_data([Token|Tail]) when is_record(Token, token) ->
       case logplex_channel:lookup(Token#token.channel_id) of
           undefined ->
  -            ?ERR("~p ~p ~p~n",
  +            ?ERR("~p ~p ~p",
                    [populate_token_channel_data, undefined_channel, Token]);
           #channel{app_id=AppId} ->
               ets:insert(tokens, Token#token{app_id=AppId})
  
positive.code: handle({cmd, "hmset", [<<"ch:", Rest/binary>> | Args]}) ->
      Id = list_to_integer(parse_id(Rest)),
      Dict = dict_from_list(Args),
      ?INFO("at=set type=channel id=~p~n", [Id]),
      create_channel(Id, Dict);
  
  handle({cmd, "hmset", [<<"tok:", Rest/binary>> | Args]}) ->
      Id = list_to_binary(parse_id(Rest)),
      Dict = dict_from_list(Args),
      Token = create_token(Id, Dict),
      ?INFO("at=set type=token id=~p~n", [Id]),
      populate_token_channel_data([Token]);
  
  handle({cmd, "hmset", [<<"drain:", Rest/binary>> | Args]}) ->
      Id = list_to_integer(parse_id(Rest)),
      Dict = dict_from_list(Args),
      Drain = create_drain(Id, Dict),
      ?INFO("at=set type=drain id=~p~n", [Id]),
      Drain#drain.host =/= undefined andalso populate_token_drain_data([Drain]);
  
  handle({cmd, "del", [<<"ch:", Rest/binary>> | _Args]}) ->
      Id = list_to_integer(parse_id(Rest)),
      ?INFO("at=delete type=channel id=~p~n", [Id]),
      ets:delete(channels, Id);
  
  handle({cmd, "del", [<<"tok:", Rest/binary>> | _Args]}) ->
      Id = list_to_binary(parse_id(Rest)),
      ?INFO("at=delete type=token id=~p~n", [Id]),
      ets:delete(tokens, Id);
  
  handle({cmd, "del", [<<"drain:", Rest/binary>> | _Args]}) ->
      Id = list_to_integer(parse_id(Rest)),
      ?INFO("at=delete type=drain id=~p~n", [Id]),
      logplex_drain:stop(tcpsyslog, Id),
      remove_token_drain_data(Id),
      ets:delete(drains, Id);
  
negative.code:                             logplex_drain:start(tcpsyslog, Token,
                                                  [Ch, Token, Host, Port]);
                          _ ->
                              ?ERR("no udp support for ~p ~p ~p:~p",
                                   [Ch, Token, Host, Port])
                      end,
                      Drain = #drain{
  