From 4034b89a07a97766dba5e6213b1eb4d76ba6df9e Mon Sep 17 00:00:00 2001 From: Zandra Hird Date: Wed, 20 May 2015 15:35:49 +0200 Subject: Revert "Map error logger warnings to warning messages by default" This reverts commit 4c4d7fa40e5fb59854724ce74b8aa3546525cb90. This pr is causing some test failures that were missed at first. --- lib/kernel/doc/src/error_logger.xml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'lib/kernel/doc') diff --git a/lib/kernel/doc/src/error_logger.xml b/lib/kernel/doc/src/error_logger.xml index f49d63b5a6..df2f0b01ee 100644 --- a/lib/kernel/doc/src/error_logger.xml +++ b/lib/kernel/doc/src/error_logger.xml @@ -58,11 +58,12 @@ specific events. (add_report_handler/1,2). Also, there is a useful event handler in STDLIB for multi-file logging of events, see log_mf_h(3).

-

Warning events were introduced in Erlang/OTP R9C and are enabled - by default as of 18.0. To retain backwards compatibility with existing - user defined event handlers, these may be tagged as errors or info - using the command line flag ]]>, thus - showing up as error or info reports in the logs.

+

Warning events were introduced in Erlang/OTP R9C. To retain + backwards compatibility, these are by default tagged as errors, + thus showing up as error reports in the logs. By using + the command line flag ]]>, they can instead + be tagged as warnings or info. Tagging them as warnings may + require rewriting existing user defined event handlers.

@@ -131,7 +132,7 @@ ok

Returns the current mapping for warning events. Events sent using warning_msg/1,2 or warning_report/1,2 - are tagged as errors, warnings (default) or info, depending + are tagged as errors (default), warnings or info, depending on the value of the command line flag +W.

 os$ erl
@@ -139,25 +140,25 @@ Erlang (BEAM) emulator version 5.4.8 [hipe] [threads:0] [kernel-poll]
 
 Eshell V5.4.8  (abort with ^G)
 1> error_logger:warning_map().
-warning
-2> error_logger:warning_msg("Warnings tagged as: ~p~n", [warning]).
+error
+2> error_logger:warning_msg("Warnings tagged as: ~p~n", [error]).
 
-=WARNING REPORT==== 11-Aug-2005::15:31:55 ===
-Warnings tagged as: warning
+=ERROR REPORT==== 11-Aug-2005::15:31:23 ===
+Warnings tagged as: error
 ok
 3> 
 User switch command
  --> q
-os$ erl +W e
+os$ erl +W w
 Erlang (BEAM) emulator version 5.4.8 [hipe] [threads:0] [kernel-poll]
 
 Eshell V5.4.8  (abort with ^G)
 1> error_logger:warning_map().
-error
-2> error_logger:warning_msg("Warnings tagged as: ~p~n", [error]).
+warning
+2> error_logger:warning_msg("Warnings tagged as: ~p~n", [warning]).
 
-=ERROR REPORT==== 11-Aug-2005::15:31:23 ===
-Warnings tagged as: error
+=WARNING REPORT==== 11-Aug-2005::15:31:55 ===
+Warnings tagged as: warning
 ok
-- cgit v1.2.3