anchor.diff:              end,
       {MinTStamp, Limit}.
   
  +bin_boolean(true) -> <<"1">>;
  +bin_boolean(_)    -> <<"0">>.
  +
  +bin_string(undefined) -> <<"">>;
  +bin_string(S)         -> list_to_binary(S).
  +
   -ifdef(EUNIT).
   
   test() ->
  
positive.code: 
  build_alerts_settings() ->
      C = get_alert_config(),
      [{email, list_to_binary(proplists:get_value(email, C, ""))},
       {sendAlerts, case proplists:get_value(email_alerts, C, false) of
                        true -> <<"1">>;
                        _    -> <<"0">>
                    end} |
       lists:map(fun(X) ->
                         {"s_" ++ atom_to_list(X), <<"1">>}
                 end,
                 proplists:get_value(alerts, C, []))].
  
  build_logs(Params) ->
      {MinTStamp, Limit} = common_params(Params),
  
negative.code:                   lists:keystore(email_alerts, 1, C, {email_alerts, true});
               ({"email_alerts", "0"}, C) ->
                    lists:keystore(email_alerts, 1, C, {email_alerts, false});
               ({[$a, $l, $e, $r, $t, $_ | K], "1"}, C) ->
                    case is_alert_key(K) of
                        true ->
                            lists:keystore(alerts, 1, C,
  