anchor.diff:                      Fields)
               ],
               Gelf2 = nklib_json:encode(maps:from_list(lists:flatten(Gelf1))),
  -            % io:format("SENDING ~p ~p ~s\n", [Ip, Port, Gelf2]),
  -            Gelf3 = zlib:gzip(Gelf2),
  -            ok = gen_udp:send(Socket, Ip, Port, Gelf3),
  +            case byte_size(Gelf2) of
  +                Size when Size =< ?MAX_UDP ->
  +                    % io:format("SENDING ~p ~p (~p) ~s\n", 
  +                    %           [Ip, Port, byte_size(Gelf2), Gelf2]),
  +                    ok = gen_udp:send(Socket, Ip, Port, Gelf2);
  +                Size ->
  +                    Chunks = get_num_chunks(Size),
  +                    Id = crypto:rand_bytes(8),
  +                    Head = <<30, 15, Id/binary>>,
  +                    send_chunks(Gelf2, Head, 0, Chunks, Socket, Ip, Port)
  +            end,
               {ok, State};
           _ ->
               {error, invalid_message}
  
positive.code:     {error, missing_gelf_server}.
  
  
  
negative.code: 
  -export([init/2, message/3, terminate/2]).
  -export_type([gelf/0, opts/0]).
  
  -define(MAX_UDP, 1024).
  
  
  %% ===================================================================
  