aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/sys.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2018-10-22 10:37:35 +0200
committerRaimo Niskanen <[email protected]>2018-11-16 14:40:44 +0100
commit53850d6c310643393185819c179efd4b866943fe (patch)
treec2ce65a1855b25316dbc0ef0c965494dcf479bd7 /lib/stdlib/src/sys.erl
parent156a1af989f4977eb68e4c64feb79c55f2a0855d (diff)
downloadotp-53850d6c310643393185819c179efd4b866943fe.tar.gz
otp-53850d6c310643393185819c179efd4b866943fe.tar.bz2
otp-53850d6c310643393185819c179efd4b866943fe.zip
Print sys:log in error report
Diffstat (limited to 'lib/stdlib/src/sys.erl')
-rw-r--r--lib/stdlib/src/sys.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/stdlib/src/sys.erl b/lib/stdlib/src/sys.erl
index 8e12b3ff8d..6775dfe933 100644
--- a/lib/stdlib/src/sys.erl
+++ b/lib/stdlib/src/sys.erl
@@ -30,7 +30,7 @@
log_to_file/2, log_to_file/3, no_debug/1, no_debug/2,
install/2, install/3, remove/2, remove/3]).
-export([handle_system_msg/6, handle_system_msg/7, handle_debug/4,
- print_log/1, get_debug/3, debug_options/1, suspend_loop_hib/6]).
+ print_log/1, get_log/1, get_debug/3, debug_options/1, suspend_loop_hib/6]).
%%-----------------------------------------------------------------
%% Types
@@ -635,6 +635,12 @@ print_log(Debug) ->
NLog = get_debug(log, Debug, nlog_new()),
lists:foreach(fun print_event/1, nlog_get(NLog)).
+-spec get_log(Debug) -> [system_event()] when
+ Debug :: [dbg_opt()].
+get_log(Debug) ->
+ NLog = get_debug(log, Debug, nlog_new()),
+ nlog_get(NLog).
+
close_log_file(Debug) ->
case get_debug2(log_to_file, Debug, []) of
[] ->