diff options
author | Siri Hansen <[email protected]> | 2018-11-28 12:02:17 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2018-11-28 12:02:17 +0100 |
commit | e46d5adbc263b6bec01633217cf4bf39f04a53f2 (patch) | |
tree | 409b9da97bd28377b5683c399f0ca32408ed1f45 | |
parent | f20d86b7994596ace8713b61af0925d273a7f03e (diff) | |
parent | a99db2cf37ce08c07724645cc2d290c0fc574c81 (diff) | |
download | otp-e46d5adbc263b6bec01633217cf4bf39f04a53f2.tar.gz otp-e46d5adbc263b6bec01633217cf4bf39f04a53f2.tar.bz2 otp-e46d5adbc263b6bec01633217cf4bf39f04a53f2.zip |
Merge branch 'siri/logger/doc-macros-in-hrl/ERL-787' into maint
* siri/logger/doc-macros-in-hrl/ERL-787:
[logger] Document that macros are defined in logger.hrl
-rw-r--r-- | lib/kernel/doc/src/logger.xml | 5 | ||||
-rw-r--r-- | lib/kernel/doc/src/logger_chapter.xml | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/kernel/doc/src/logger.xml b/lib/kernel/doc/src/logger.xml index 2bcf137299..e0b95fa4ad 100644 --- a/lib/kernel/doc/src/logger.xml +++ b/lib/kernel/doc/src/logger.xml @@ -290,7 +290,10 @@ logger:error("error happened because: ~p", [Reason]). % Without macro <section> <title>Macros</title> - <p>The following macros are defined:</p> + <p>The following macros are defined in <c>logger.hrl</c>, which + is included in a module with the directive</p> + <code> + -include_lib("kernel/include/logger.hrl").</code> <list> <item><c>?LOG_EMERGENCY(StringOrReport[,Metadata])</c></item> diff --git a/lib/kernel/doc/src/logger_chapter.xml b/lib/kernel/doc/src/logger_chapter.xml index 1870d2ab79..458e61cef5 100644 --- a/lib/kernel/doc/src/logger_chapter.xml +++ b/lib/kernel/doc/src/logger_chapter.xml @@ -113,7 +113,10 @@ of functions on the form <c>logger:Level/1,2,3</c>, which are all shortcuts for <seealso marker="logger#log-2"> - <c>logger:log(Level,Arg1[,Arg2[,Arg3]])</c></seealso>.</p> + <c>logger:log(Level,Arg1[,Arg2[,Arg3]])</c></seealso>.</p> + <p>The macros are defined in <c>logger.hrl</c>, which is included + in a module with the directive</p> + <code>-include_lib("kernel/include/logger.hrl").</code> <p>The difference between using the macros and the exported functions is that macros add location (originator) information to the metadata, and performs lazy evaluation by wrapping the |