Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More Doc improvements

  • Loading branch information...
commit dc201b5e6d5d9e9245f9d474eabb68f6eb9565e3 1 parent b579637
Fernando Benavides authored
View
11 src/riak_err_handler.erl
@@ -82,13 +82,13 @@
add_sup_handler() ->
gen_event:add_sup_handler(error_logger, ?MODULE, []).
-%% @doc Change the internal value of <tt>set_term_max_size</tt>.
+%% @doc Change the internal value of <tt>term_max_size</tt>.
%% @spec set_term_max_size(pos_integer()) -> ok
-spec set_term_max_size(pos_integer()) -> ok.
set_term_max_size(Num) ->
gen_event:call(error_logger, ?MODULE, {set_term_max_size, Num}, infinity).
-%% @doc Change the internal value of <tt>set_fmt_max_bytes</tt>.
+%% @doc Change the internal value of <tt>fmt_max_bytes</tt>.
%% @spec set_fmt_max_bytes(pos_integer()) -> ok
-spec set_fmt_max_bytes(pos_integer()) -> ok.
set_fmt_max_bytes(Num) ->
@@ -207,8 +207,7 @@ code_change(_OldVsn, State, _Extra) ->
%% @doc Given an error_logger-style Event tuple, format it with the
%% constraints of TermMaxSize and FmtMaxSize.
%%
-%% See limited_fmt/3 for the meaning of TermMaxSize and FmtMaxSize.
-
+%% See {@link limited_fmt/3} for the meaning of TermMaxSize and FmtMaxSize.
format_event(Event, TermMaxSize, FmtMaxBytes) ->
%% Case clauses appear the same order as error_logger_tty_h:write_event/1.
{ReportStr, Pid, MsgStr, ErrorP} =
@@ -251,14 +250,14 @@ format_event(Event, TermMaxSize, FmtMaxBytes) ->
[Time, MsgStr, NodeSuffix])}
end.
--spec limited_fmt(string(), list(), integer(), integer()) -> iolist().
%% @doc Format Fmt and Args similar to what io_lib:format/2 does but with
%% limits on how large the formatted string may be.
%%
%% If the Args list's size is larger than TermMaxSize, then the
%% formatting is done by trunc_io:print/2, where FmtMaxBytes is used
%% to limit the formatted string's size.
-
+%% @spec limited_fmt(string(), list(), integer(), integer()) -> iolist()
+-spec limited_fmt(string(), list(), integer(), integer()) -> iolist().
limited_fmt(Fmt, Args, TermMaxSize, FmtMaxBytes) ->
TermSize = erts_debug:flat_size(Args),
if TermSize > TermMaxSize ->
View
4 src/riak_err_monitor.erl
@@ -38,10 +38,14 @@
%%%----------------------------------------------------------------------
%%% API
%%%----------------------------------------------------------------------
+%% @doc Starts the monitor
+%% @spec start_link() -> {ok, pid()} | ignore | {error, term()}
-spec start_link() -> {ok, pid()} | ignore | {error, term()}.
start_link() ->
gen_server:start_link({local, ?NAME}, ?MODULE, [], []).
+%% @doc Stops the monitor
+%% @spec stop() -> ok
-spec stop() -> ok.
stop() ->
gen_event:call(?NAME, stop, infinity).
View
2  src/riak_err_stdlib.erl
@@ -22,7 +22,7 @@
%%
%% All functions in this module are covered by the Erlang/OTP source
%% distribution's license, the Erlang Public License. See
-%% {@link http://www.erlang.org/} for full details.
+%% <a href="http://www.erlang.org/">Erlang.org</a> for full details.
-module(riak_err_stdlib).
-export([write_time/2, maybe_utc/1]).
Please sign in to comment.
Something went wrong with that request. Please try again.