Skip to content

Commit

Permalink
Merge pull request #567 from kianmeng/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
Jade Allen authored Jan 29, 2022
2 parents fae5339 + 88d0f39 commit a140ea9
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ will be applied on that sink.

Custom Formatting
-----------------
All loggers have a default formatting that can be overriden. A formatter is any module that
All loggers have a default formatting that can be overridden. A formatter is any module that
exports `format(#lager_log_message{},Config#any())`. It is specified as part of the configuration
for the backend:

Expand Down Expand Up @@ -653,7 +653,7 @@ record a module compiled with the lager parse transform knows about by using the
lager:info("My state is ~p", [lager:pr(State, ?MODULE)])
```

Often, `?MODULE` is sufficent, but you can obviously substitute that for a literal module name.
Often, `?MODULE` is sufficient, but you can obviously substitute that for a literal module name.
`lager:pr` also works from the shell.

Colored terminal output
Expand Down Expand Up @@ -791,7 +791,7 @@ A special log level, `silence` can be used together with a filter in order
to suppress specific log output. This can be useful if a backend has been
configured for a particular log level, but a particular set of log messages
clutters the log. If these come from a dependency, they might be difficult
to remove entirely, and it might not be desireable to do so in general.
to remove entirely, and it might not be desirable to do so in general.
In such situations, a trace filter with log level `silence` can turn them
off selectively, while letting other messages through as before.

Expand Down Expand Up @@ -1263,7 +1263,7 @@ Example Usage:
* Bugfix: flush_threshold not working (#449)
* Feature: Add `node` as a formatting option (#447)
* Documentation: Update Elixir section with information about parse_transform (#446)
* Bugfix: Correct default console configuation to use "[{level,info}]" instead (#445)
* Bugfix: Correct default console configuration to use "[{level,info}]" instead (#445)
* Feature: Pretty print lists of records at top level and field values with lager:pr (#442)
* Bugfix: Ignore return value of lager:dispatch_log in lager.hrl (#441)

Expand Down Expand Up @@ -1339,7 +1339,7 @@ Example Usage:
3.3.0 - 16 February 2017
* Docs: Fix documentation to make 'it' unambiguous when discussing asychronous
* Docs: Fix documentation to make 'it' unambiguous when discussing asynchronous
operation. (#387)
* Test: Fix test flappiness due to insufficient sanitation between test runs (#384, #385)
* Feature: Allow metadata only logging. (#380)
Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
warn_unused_import
% do NOT include warnings_as_errors, as rebar includes these options
% when compiling for eunit, and at least one test module has code that
% is deliberatly broken and will generate an un-maskable warning
% is deliberately broken and will generate an un-maskable warning
]}.

{erl_first_files, ["src/lager_util.erl"]}.
Expand Down
6 changes: 3 additions & 3 deletions src/error_logger_lager_h.erl
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ format_offender(Off) ->
[Name, MFA, get_value(pid, Off)])
end.

%% backwards compatability shim
%% backwards compatibility shim
format_reason(Reason) ->
element(2, format_reason_md(Reason)).

Expand Down Expand Up @@ -551,7 +551,7 @@ format_reason_md(Reason) ->
{Str, _} = lager_trunc_io:print(Reason, 500),
{[], Str}.

%% backwards compatability shim
%% backwards compatibility shim
format_mfa(MFA) ->
element(2, format_mfa_md(MFA)).

Expand All @@ -575,7 +575,7 @@ format_mfa_md([{M, F, A}| _]) ->
format_mfa_md([{M, F, A, Props}| _]) when is_list(Props) ->
%% this kind of weird stacktrace can be generated by a uncaught throw in a gen_server
%% TODO we might not always want to print the first MFA we see here, often it is more helpful
%% to print a lower one, but it is hard to programatically decide.
%% to print a lower one, but it is hard to programmatically decide.
format_mfa_md({M, F, A, Props});
format_mfa_md(Other) ->
{[], io_lib:format("~w", [Other])}.
Expand Down
2 changes: 1 addition & 1 deletion src/lager.erl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
count :: infinity | pos_integer(),
format_string :: string(),
timeout :: infinity | pos_integer(),
started = os:timestamp() :: erlang:timestamp() %% use os:timestamp for compatability
started = os:timestamp() :: erlang:timestamp() %% use os:timestamp for compatibility
}).

%% API
Expand Down
2 changes: 1 addition & 1 deletion src/lager_common_test_backend.erl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
bounce/0,
bounce/1]).

%% holds the log messages for retreival on terminate
%% holds the log messages for retrieval on terminate
-record(state, {level :: {mask, integer()},
formatter :: atom(),
format_config :: any(),
Expand Down
2 changes: 1 addition & 1 deletion src/lager_default_formatter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ basic_test_() ->
[metadata]
)))
},
{"Metadata can be printed in its enterity with custom seperators",
{"Metadata can be printed in its enterity with custom separators",
?_assertEqual(iolist_to_binary(["bar->2, baz->3, foo->1"]),
iolist_to_binary(format(lager_msg:new("Message",
Now,
Expand Down
4 changes: 2 additions & 2 deletions src/lager_file_backend.erl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

%% @doc File backend for lager, with multiple file support.
%% Multiple files are supported, each with the path and the loglevel being
%% configurable. The configuration paramter for this backend is a list of
%% configurable. The configuration parameter for this backend is a list of
%% key-value 2-tuples. See the init() function for the available options.
%% This backend supports external and internal log
%% rotation and will re-open handles to files if the inode changes. It will
Expand Down Expand Up @@ -111,7 +111,7 @@ init([{FileName, LogLevel}, {Formatter,FormatterConfig}]) when is_list(FileName)
init(LogFileConfig) when is_list(LogFileConfig) ->
case validate_logfile_proplist(LogFileConfig) of
false ->
%% falied to validate config
%% failed to validate config
{error, {fatal, bad_config}};
Config ->
%% probabably a better way to do this, but whatever
Expand Down
2 changes: 1 addition & 1 deletion src/lager_format.erl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pad_char(Fmt, Args) -> {$\s,Fmt,Args}.

%% collect_cc([FormatChar], [Argument]) ->
%% {Control,[ControlArg],[FormatChar],[Arg]}.
%% Here we collect the argments for each control character.
%% Here we collect the arguments for each control character.
%% Be explicit to cause failure early.

collect_cc([$w|Fmt], [A|Args]) -> {$w,[A],Fmt,Args};
Expand Down
2 changes: 1 addition & 1 deletion src/lager_transform.erl
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ do_transform(Line, SinkName, Severity, Arguments0, Safety) ->
unsafe ->
do_log_unsafe
end,
%% Wrap the call to lager:dispatch_log/6 in case that will avoid doing any work if this message is not elegible for logging
%% Wrap the call to lager:dispatch_log/6 in case that will avoid doing any work if this message is not eligible for logging
%% See lager.erl (lines 89-100) for lager:dispatch_log/6
%% case {whereis(Sink), whereis(?DEFAULT_SINK), lager_config:get({Sink, loglevel}, {?LOG_NONE, []})} of
{'case',Line,
Expand Down
6 changes: 3 additions & 3 deletions test/lager_test_backend.erl
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,9 @@ lager_test_() ->
?assertEqual(0, count()),
lager:trace(?MODULE, [{module, ?MODULE}], debug),
?assertMatch({?ERROR bor ?CRITICAL bor ?ALERT bor ?EMERGENCY, _}, lager_config:get(loglevel)),
%% elegible for tracing
%% eligible for tracing
ok = lager:info("hello world"),
%% NOT elegible for tracing
%% NOT eligible for tracing
ok = lager:log(info, [{pid, self()}], "hello world"),
?assertEqual(1, count()),
ok
Expand Down Expand Up @@ -943,7 +943,7 @@ test_body(Expected, Actual) ->
"Trailing data \"~s\" following \"~s\"",
[Rest, Expected]);
{match, [{0, _}]} ->
% the whole sting is " line NNN"
% the whole string is " line NNN"
ok;
{match, [{Off, _}]} ->
?debugFmt(
Expand Down
2 changes: 1 addition & 1 deletion test/sync_error_logger.erl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
%% The error_logger API, but synchronous!
%% This is helpful for tests, otherwise you need lots of nasty timer:sleep.
%% Additionally, the warning map can be set on a per-process level, for
%% convienience, via the process dictionary value `warning_map'.
%% convenience, via the process dictionary value `warning_map'.

-export([
info_msg/1, info_msg/2,
Expand Down

0 comments on commit a140ea9

Please sign in to comment.