aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/doc
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-05-23 12:34:30 +0200
committerSiri Hansen <[email protected]>2018-05-23 12:48:25 +0200
commit72f1ce276401e0b8de9c0c527cbc324da0186939 (patch)
treeee9213c25a48b2766b5659838ad2a1d1ab0f2cbf /lib/kernel/doc
parent80606372f163ac26980010ee64464b2ace412100 (diff)
downloadotp-72f1ce276401e0b8de9c0c527cbc324da0186939.tar.gz
otp-72f1ce276401e0b8de9c0c527cbc324da0186939.tar.bz2
otp-72f1ce276401e0b8de9c0c527cbc324da0186939.zip
Change type name logger:log() to logger:log_event()
Diffstat (limited to 'lib/kernel/doc')
-rw-r--r--lib/kernel/doc/src/logger.xml18
-rw-r--r--lib/kernel/doc/src/logger_chapter.xml26
2 files changed, 22 insertions, 22 deletions
diff --git a/lib/kernel/doc/src/logger.xml b/lib/kernel/doc/src/logger.xml
index d6576db6f3..bb356c5b86 100644
--- a/lib/kernel/doc/src/logger.xml
+++ b/lib/kernel/doc/src/logger.xml
@@ -87,7 +87,7 @@ logger:error("error happened because: ~p",[Reason]). %% Without macro
</desc>
</datatype>
<datatype>
- <name name="log"/>
+ <name name="log_event"/>
<desc>
<p></p>
</desc>
@@ -446,7 +446,7 @@ Current logger configuration:
<p>The return value of the fun specifies if a log event is to
be discarded or forwarded to the handlers:</p>
<taglist>
- <tag><c>log()</c></tag>
+ <tag><c>log_event()</c></tag>
<item>
<p>The filter <em>passed</em>. The next logger filter, if
any, is applied. If no more logger filters exist, the
@@ -487,7 +487,7 @@ Current logger configuration:
<p>The return value of the fun specifies if a log event is to
be discarded or forwarded to the handler callback:</p>
<taglist>
- <tag><c>log()</c></tag>
+ <tag><c>log_event()</c></tag>
<item>
<p>The filter <em>passed</em>. The next handler filter, if
any, is applied. If no more filters exist for this
@@ -929,11 +929,11 @@ logger:set_process_metadata(maps:merge(logger:get_process_metadata(),Meta)).
</func>
<func>
- <name>HModule:log(Log,Config) -> void()</name>
+ <name>HModule:log(LogEvent,Config) -> void()</name>
<fsummary>Log the given log event.</fsummary>
<type>
- <v>Log =
- <seealso marker="#type-log">log()</seealso></v>
+ <v>LogEvent =
+ <seealso marker="#type-log_event">log_event()</seealso></v>
<v>Config =
<seealso marker="#type-config">config()</seealso></v>
</type>
@@ -979,11 +979,11 @@ logger:set_process_metadata(maps:merge(logger:get_process_metadata(),Meta)).
<funcs>
<func>
- <name>FModule:format(Log,FConfig) -> FormattedLogEntry</name>
+ <name>FModule:format(LogEvent,FConfig) -> FormattedLogEntry</name>
<fsummary>Format the given log event.</fsummary>
<type>
- <v>Log =
- <seealso marker="#type-log">log()</seealso></v>
+ <v>LogEvent =
+ <seealso marker="#type-log_event">log_event()</seealso></v>
<v>FConfig =
<seealso marker="#type-formatter_config">formatter_config()</seealso></v>
<v>FormattedLogEntry =
diff --git a/lib/kernel/doc/src/logger_chapter.xml b/lib/kernel/doc/src/logger_chapter.xml
index dff9ee2892..3b4cafb010 100644
--- a/lib/kernel/doc/src/logger_chapter.xml
+++ b/lib/kernel/doc/src/logger_chapter.xml
@@ -252,7 +252,7 @@
<p>A handler is defined as a module exporting at least the
following function:</p>
- <pre><seealso marker="logger#HModule:log-2">log(Log, Config)</seealso></pre>
+ <pre><seealso marker="logger#HModule:log-2">log(LogEvent, Config)</seealso></pre>
<p>This function is called when a log event has passed through all
global filters, and all handler filters attached to the handler
@@ -320,7 +320,7 @@
module, <c>FModule</c> and its
configuration, <c>FConfig</c>. <c>FModule</c> must export the
following function, which can be called by the handler:</p>
- <pre><seealso marker="logger#FModule:format-2">format(Log,FConfig)
+ <pre><seealso marker="logger#FModule:format-2">format(LogEvent,FConfig)
-> FormattedLogEntry</seealso></pre>
<p>See the <seealso marker="logger_formatter">
<c>logger_formatter(3)</c></seealso> manual for the full
@@ -735,7 +735,7 @@ ok</pre>
<title>Example: implement a handler</title>
<p>The only requirement that a handler MUST fulfill is to export
the following function:</p>
- <code>log(logger:log(),logger:config()) ->ok</code>
+ <code>log(logger:log_event(),logger:config()) -> ok</code>
<p>It may also implement the following callbacks:</p>
<code>
adding_handler(logger:config()) -> {ok,logger:config()} | {error,term()}
@@ -763,8 +763,8 @@ changing_config(logger:config(),logger:config()) -> {ok,logger:config()} | {erro
-module(myhandler).
-export([log/2]).
-log(Log,#{formatter:={FModule,FConfig}) ->
- io:put_chars(FModule:format(Log,FConfig)).
+log(LogEvent,#{formatter:={FModule,FConfig}) ->
+ io:put_chars(FModule:format(LogEvent,FConfig)).
</code>
<p>A simple handler which prints to file could be implemented like
@@ -782,8 +782,8 @@ removing_handler(#{myhandler_fd:=Fd}) ->
_ = file:close(Fd),
ok.
-log(Log,#{myhandler_fd:=Fd,formatter:={FModule,FConfig}}) ->
- io:put_chars(Fd,FModule:format(Log,FConfig)).
+log(LogEvent,#{myhandler_fd:=Fd,formatter:={FModule,FConfig}}) ->
+ io:put_chars(Fd,FModule:format(LogEvent,FConfig)).
</code>
<note><p>The above handlers do not have any overload
@@ -810,8 +810,8 @@ adding_handler(Config) ->
removing_handler(#{myhandler_pid:=Pid}) ->
gen_server:stop(Pid).
-log(Log,#{myhandler_pid:=Pid} = Config) ->
- gen_server:cast(Pid,{log,Log,Config}).
+log(LogEvent,#{myhandler_pid:=Pid} = Config) ->
+ gen_server:cast(Pid,{log,LogEvent,Config}).
init(#{myhandler_file:=File}) ->
{ok,Fd} = file:open(File,[append,{encoding,utf8}]),
@@ -820,16 +820,16 @@ init(#{myhandler_file:=File}) ->
handle_call(_,_,State) ->
{reply,{error,bad_request},State}.
-handle_cast({log,Log,Config},#{fd:=Fd} = State) ->
- do_log(Fd,Log,Config),
+handle_cast({log,LogEvent,Config},#{fd:=Fd} = State) ->
+ do_log(Fd,LogEvent,Config),
{noreply,State}.
terminate(Reason,#{fd:=Fd}) ->
_ = file:close(Fd),
ok.
-do_log(Fd,Log,#{formatter:={FModule,FConfig}}) ->
- String = FModule:format(Log,FConfig),
+do_log(Fd,LogEvent,#{formatter:={FModule,FConfig}}) ->
+ String = FModule:format(LogEvent,FConfig),
io:put_chars(Fd,String).
</code>
</section>