diff options
author | Siri Hansen <[email protected]> | 2018-06-18 17:53:00 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2018-07-13 12:20:25 +0200 |
commit | da166b76de977171243dd2ea7f86b98f451fabc5 (patch) | |
tree | e1a3dd7acf36f9e0e1f6c1b9bf44c4bc4e60d412 /lib/kernel/doc/src | |
parent | 8fed5e01980996cd34be6e27370eed74b5c0ed5d (diff) | |
download | otp-da166b76de977171243dd2ea7f86b98f451fabc5.tar.gz otp-da166b76de977171243dd2ea7f86b98f451fabc5.tar.bz2 otp-da166b76de977171243dd2ea7f86b98f451fabc5.zip |
[logger] Add ?LOG macro which takes Level as argument
Diffstat (limited to 'lib/kernel/doc/src')
-rw-r--r-- | lib/kernel/doc/src/logger.xml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/kernel/doc/src/logger.xml b/lib/kernel/doc/src/logger.xml index b1321a93dc..8bf62a6b39 100644 --- a/lib/kernel/doc/src/logger.xml +++ b/lib/kernel/doc/src/logger.xml @@ -290,13 +290,16 @@ logger:error("error happened because: ~p", [Reason]). % Without macro <item><c>?LOG_INFO(FunOrFormat,Args[,Metadata])</c></item> <item><c>?LOG_DEBUG(StringOrReport[,Metadata])</c></item> <item><c>?LOG_DEBUG(FunOrFormat,Args[,Metadata])</c></item> + <item><c>?LOG(Level,StringOrReport[,Metadata])</c></item> + <item><c>?LOG(Level,FunOrFormat,Args[,Metadata])</c></item> </list> <p>All macros expand to a call to Logger, where <c>Level</c> is - taken from the macro name, and location data is added to the - metadata. See the description of + taken from the macro name, or from the first argument in the + case of the <c>?LOG</c> macro. Location data is added to the + metadata as described under the <seealso marker="#type-metadata"><c>metadata()</c></seealso> - type for more information about the location data.</p> + type definition.</p> <p>The call is wrapped in a case statement and will be evaluated only if <c>Level</c> is equal to or below the configured log |