<commit_before>%%==============================================================================
%% @author <NAME> <<EMAIL>>
%% @copyright 2015 AWeber Communications
%% @end
%%==============================================================================
-module(autocluster_log).

%% API
-export([debug/1, debug/2,
         info/1, info/2,
         error/1, error/2,
         warning/1, warning/2]).

%% Logging methods

debug(Message)         -> log(rabbit_log, debug, Message, []).
debug(Message, Args)   -> log(rabbit_log, debug, Message, Args).
info(Message)          -> log(rabbit_log, info, Message, []).
info(Message, Args)    -> log(rabbit_log, info, Message, Args).
error(Message)         -> log(rabbit_log, error, Message, []).
error(Message, Args)   -> log(rabbit_log, error, Message, Args).
warning(Message)       -> log(rabbit_log, error, Message, []).
warning(Message, Args) -> log(rabbit_log, error, Message, Args).

%% @private
%% @spec log(Module, Function, Message, Args) -> ok
%% @doc Ensure all logged lines share the same format
%% @end
%%
log(Module, Fun, Message, Args) ->
  Module:Fun(string:join(["autocluster_consul: ", Message, "~n"], ""), Args).<commit_msg>Its no longer only consul<commit_after>%%==============================================================================
%% @author <NAME> <<EMAIL>>
%% @copyright 2015 AWeber Communications
%% @end
%%==============================================================================
-module(autocluster_log).

%% API
-export([debug/1, debug/2,
         info/1, info/2,
         error/1, error/2,
         warning/1, warning/2]).

%% Logging methods

debug(Message)         -> log(rabbit_log, debug, Message, []).
debug(Message, Args)   -> log(rabbit_log, debug, Message, Args).
info(Message)          -> log(rabbit_log, info, Message, []).
info(Message, Args)    -> log(rabbit_log, info, Message, Args).
error(Message)         -> log(rabbit_log, error, Message, []).
error(Message, Args)   -> log(rabbit_log, error, Message, Args).
warning(Message)       -> log(rabbit_log, error, Message, []).
warning(Message, Args) -> log(rabbit_log, error, Message, Args).

%% @private
%% @spec log(Module, Function, Message, Args) -> ok
%% @doc Ensure all logged lines share the same format
%% @end
%%
log(Module, Fun, Message, Args) ->
  Module:Fun(string:join(["autocluster: ", Message, "~n"], ""), Args).
{'fraction_non_alphanumeric': 0.29305263157894734, 'fraction_numerical': 0.010105263157894737, 'mean_word_length': 4.48729792147806, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2608101', 'n_tokens_mistral': 730, 'n_tokens_neox': 706, 'n_words': 175}