From a99db2cf37ce08c07724645cc2d290c0fc574c81 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 27 Nov 2018 16:36:17 +0100 Subject: [logger] Document that macros are defined in logger.hrl --- lib/kernel/doc/src/logger.xml | 5 ++++- lib/kernel/doc/src/logger_chapter.xml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'lib') 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
Macros -

The following macros are defined:

+

The following macros are defined in logger.hrl, which + is included in a module with the directive

+ + -include_lib("kernel/include/logger.hrl"). ?LOG_EMERGENCY(StringOrReport[,Metadata]) 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 logger:Level/1,2,3, which are all shortcuts for - logger:log(Level,Arg1[,Arg2[,Arg3]]).

+ logger:log(Level,Arg1[,Arg2[,Arg3]]).

+

The macros are defined in logger.hrl, which is included + in a module with the directive

+ -include_lib("kernel/include/logger.hrl").

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 -- cgit v1.2.3