Skip to content

Commit

Permalink
Merge pull request #166 from basho/feature/sdc/log-warnings-from-tran…
Browse files Browse the repository at this point in the history
…slations

Add cuttlefish:warn/1 for use in translations.

Reviewed-by: javajolt
  • Loading branch information
borshop committed Oct 14, 2014
2 parents b2ce0b1 + 7100650 commit 80225f2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/cuttlefish.erl
Expand Up @@ -33,7 +33,8 @@
unset/0,
invalid/1,
otp/2,
otp/3
otp/3,
warn/1
]).

% @doc If DesiredMinimum =< the OTP you're running, then return
Expand Down Expand Up @@ -115,6 +116,12 @@ unset() ->
invalid(Reason) ->
throw({invalid, Reason}).

%% @doc When called inside a translation, results in a warning message
%% being logged.
-spec warn(iodata()) -> ok.
warn(Str) ->
lager:warning(Str, []).

-ifdef(TEST).

otp_test() ->
Expand Down

0 comments on commit 80225f2

Please sign in to comment.