Permalink
Browse files

Fixing embarrassing typoes

  • Loading branch information...
1 parent de63108 commit b00dc784d0d12066b298f8bb9a559e489ef9cba1 @ferd committed Oct 26, 2012
Showing with 22 additions and 22 deletions.
  1. +2 −2 src/lager.app.src
  2. +1 −1 src/lager.erl
  3. +3 −3 src/lager_app.erl
  4. +10 −10 src/lager_deduper.erl
  5. +1 −1 src/lager_sup.erl
  6. +2 −2 test/lager_overload.erl
  7. +3 −3 test/lager_test_backend_dedup.erl
View
@@ -40,9 +40,9 @@
{error_logger_redirect, true},
%% How sensitive lager should be to near-duplicates. 0 means no
%% special handling is done
- {duplicate_treshold, 0},
+ {duplicate_threshold, 0},
%% How frequently lager should dump its duplicate entries, in milliseconds.
- %% only used if duplicate_treshold > 0
+ %% only used if duplicate_threshold > 0
{duplicate_dump, 1000},
%% How many similar messages can be logged per dump. If 150 log
%% messages are identical but this limit is set to 5, the log handler
View
@@ -271,7 +271,7 @@ minimum_loglevel(Levels) ->
erlang:hd(lists:reverse(lists:sort(Levels))).
safe_notify(Event) ->
- case lager_mochiglobal:get(duplicate_treshold, 0) of
+ case lager_mochiglobal:get(duplicate_threshold, 0) of
0 ->
do_safe_notify(Event);
N when N > 0 ->
View
@@ -52,11 +52,11 @@ start(_StartType, _StartArgs) ->
{_, Traces} = lager_mochiglobal:get(loglevel),
lager_mochiglobal:put(loglevel, {MinLog, Traces}),
- Treshold = case application:get_env(lager, duplicate_treshold) of
- {ok, TresV} -> TresV;
+ Threshold = case application:get_env(lager, duplicate_threshold) of
+ {ok, ThresV} -> ThresV;
_ -> 0
end,
- lager_mochiglobal:put(duplicate_treshold, Treshold),
+ lager_mochiglobal:put(duplicate_threshold, Threshold),
DumpDelay = case application:get_env(lager, duplicate_dump) of
{ok, DupDumpDelay} -> DupDumpDelay;
_ -> 1000
View
@@ -82,7 +82,7 @@ handle_call({seen, Key}, _From, S = #state{db=DB}) ->
{ok, _} ->
{reply, yes, S#state{db=increment(Key, DB)}};
undefined ->
- case close_enough(Key, DB, treshold()) of
+ case close_enough(Key, DB, threshold()) of
{_Dist, MatchKey} ->
{reply, yes, S#state{db=increment(MatchKey, DB)}};
_ ->
@@ -110,7 +110,7 @@ code_change(_OldVsn, State, _Extra) ->
terminate(_, _) -> ok.
delay() -> lager_mochiglobal:get(duplicate_dump, ?DEFAULT_TIMEOUT).
-treshold() -> lager_mochiglobal:get(duplicate_treshold, 1).
+threshold() -> lager_mochiglobal:get(duplicate_threshold, 1).
limit() -> lager_mochiglobal:get(duplicate_limit, undefined).
empty() -> ets:new(?TABLE, [protected,named_table]).
@@ -197,8 +197,8 @@ safe_notify(Event) ->
-ifdef(TEST).
-setup(Treshold, Timer) ->
- lager_mochiglobal:put(duplicate_treshold, Treshold),
+setup(Threshold, Timer) ->
+ lager_mochiglobal:put(duplicate_threshold, Threshold),
lager_mochiglobal:put(duplicate_dump, Timer),
application:start(simhash),
{ok, DedupPid} = start_link(),
@@ -208,8 +208,8 @@ setup(Treshold, Timer) ->
cleanup(Pid) ->
exit(Pid, shutdown).
-low_treshold_test_() ->
- {"Check that with low treshold, all messages are handled individually",
+low_threshold_test_() ->
+ {"Check that with low threshold, all messages are handled individually",
{foreach,
fun() -> setup(1, 100000) end,
fun cleanup/1,
@@ -220,9 +220,9 @@ low_treshold_test_() ->
{warning, <<"hella mr bond, how are you today?">>}])
end]}}.
-high_treshold_test_() ->
- {"Check that with high treshold, all messages are handled according to "
- "similarity. Super-high tresholds mean all messages get merged.",
+high_threshold_test_() ->
+ {"Check that with high threshold, all messages are handled according to "
+ "similarity. Super-high thresholds mean all messages get merged.",
{foreach,
fun() -> setup(100000, 100000) end,
fun cleanup/1,
@@ -234,7 +234,7 @@ high_treshold_test_() ->
{warning, "my cat is blue."}])
end,
fun(Pid) ->
- %% different levels won't mix, even with high tresholds.
+ %% different levels won't mix, even with high thresholds.
warning_counter(
Pid, 2,
[{warning, "hello mr bond, how are you today?"},
View
@@ -74,7 +74,7 @@ init([]) ->
_ ->
[]
end,
- Deduper = case application:get_env(lager, duplicate_treshold) of
+ Deduper = case application:get_env(lager, duplicate_threshold) of
{ok, N} when N > 0 ->
[{lager_deduper, {lager_deduper, start_link, []},
permanent, 5000, worker, [lager_deduper]}];
View
@@ -14,7 +14,7 @@ init_regular() ->
ok=application:start(simhash),
application:start(compiler),
application:start(syntax_tools),
- application:set_env(lager, duplicate_treshold, 0),
+ application:set_env(lager, duplicate_threshold, 0),
application:set_env(lager, duplicate_dump, infinity),
ok=application:start(lager).
@@ -29,7 +29,7 @@ init_dedup() ->
application:start(simhash),
application:start(compiler),
application:start(syntax_tools),
- application:set_env(lager, duplicate_treshold, 3),
+ application:set_env(lager, duplicate_threshold, 3),
application:set_env(lager, duplicate_dump, 1000),
ok=application:start(lager).
@@ -247,7 +247,7 @@ setup() ->
application:load(lager),
application:set_env(lager, handlers, [{?MODULE, info}]),
application:set_env(lager, error_logger_redirect, false),
- application:set_env(lager, duplicate_treshold, 1),
+ application:set_env(lager, duplicate_threshold, 1),
application:set_env(lager, duplicate_dump, 100000),
application:start(crypto),
application:start(simhash),
@@ -287,7 +287,7 @@ error_logger_redirect_crash_test_() ->
application:load(lager),
application:set_env(lager, error_logger_redirect, true),
application:set_env(lager, handlers, [{?MODULE, error}]),
- application:set_env(lager, duplicate_treshold, 1),
+ application:set_env(lager, duplicate_threshold, 1),
application:set_env(lager, duplicate_dump, 100000),
application:start(crypto),
application:start(simhash),
@@ -486,7 +486,7 @@ error_logger_redirect_test_() ->
application:load(lager),
application:set_env(lager, error_logger_redirect, true),
application:set_env(lager, handlers, [{?MODULE, info}]),
- application:set_env(lager, duplicate_treshold, 1),
+ application:set_env(lager, duplicate_threshold, 1),
application:set_env(lager, duplicate_dump, 100000),
application:start(crypto),
application:start(simhash),

0 comments on commit b00dc78

Please sign in to comment.