summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Niemier <lukasz@niemier.pl>2020-01-31 17:38:18 +0100
committerŁukasz Niemier <lukasz@niemier.pl>2020-02-04 13:43:14 +0100
commitd68a2212902e4c1bc864bc984314f1e10cfd63eb (patch)
tree5ff4ffe3607d1649e7a735cd3b632a23691a8f3d
parent28f05cacb21d8ecdd4f4b969237814639b9c836a (diff)
downloaderlang-d68a2212902e4c1bc864bc984314f1e10cfd63eb.tar.gz
test(kernel): check that user can add handler with custom device
-rw-r--r--lib/kernel/doc/src/logger_std_h.xml2
-rw-r--r--lib/kernel/test/logger_std_h_SUITE.erl6
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/kernel/doc/src/logger_std_h.xml b/lib/kernel/doc/src/logger_std_h.xml
index 84f53fa9b1..73c19dbfdc 100644
--- a/lib/kernel/doc/src/logger_std_h.xml
+++ b/lib/kernel/doc/src/logger_std_h.xml
@@ -55,7 +55,7 @@
is stored in a sub map with the key <c>config</c>, and can contain the
following parameters:</p>
<taglist>
- <tag><marker id="type"/><c>type = standard_io | standard_error | file | {device, atom() | file:io_device()}</c></tag>
+ <tag><marker id="type"/><c>type = standard_io | standard_error | file | {device, io:device()}</c></tag>
<item>
<p>Specifies the log destination.</p>
<p>The value is set when the handler is added, and it cannot
diff --git a/lib/kernel/test/logger_std_h_SUITE.erl b/lib/kernel/test/logger_std_h_SUITE.erl
index 602a79c78b..53dc4f516a 100644
--- a/lib/kernel/test/logger_std_h_SUITE.erl
+++ b/lib/kernel/test/logger_std_h_SUITE.erl
@@ -118,6 +118,7 @@ all() ->
[add_remove_instance_tty,
add_remove_instance_standard_io,
add_remove_instance_standard_error,
+ add_remove_instance_custom_device,
add_remove_instance_file1,
add_remove_instance_file2,
add_remove_instance_file3,
@@ -175,6 +176,11 @@ add_remove_instance_standard_io(_Config) ->
add_remove_instance_standard_io(cleanup,_Config) ->
logger_std_h_remove().
+add_remove_instance_custom_device(_Config) ->
+ add_remove_instance_nofile({device,user}).
+add_remove_instance_custom_device(cleanup,_Config) ->
+ logger_std_h_remove().
+
add_remove_instance_standard_error(_Config) ->
add_remove_instance_nofile(standard_error).
add_remove_instance_standard_error(cleanup,_Config) ->