aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_logs.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2017-10-03 14:53:42 +0200
committerPeter Andersson <[email protected]>2017-10-25 17:28:55 +0200
commit70b6b32a9c7e3e3fca45fc3a0e11e2a5087a4660 (patch)
treeffce83db6a82e5aaa89f474732794c9a915d6157 /lib/common_test/src/ct_logs.erl
parent7fb796ab3636af53a7ef659099c1fb9fe37c1957 (diff)
downloadotp-70b6b32a9c7e3e3fca45fc3a0e11e2a5087a4660.tar.gz
otp-70b6b32a9c7e3e3fca45fc3a0e11e2a5087a4660.tar.bz2
otp-70b6b32a9c7e3e3fca45fc3a0e11e2a5087a4660.zip
Add app name tag in process dictionary
Diffstat (limited to 'lib/common_test/src/ct_logs.erl')
-rw-r--r--lib/common_test/src/ct_logs.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index ba7660fe6a..f7c118a4c7 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -665,6 +665,7 @@ log_timestamp({MS,S,US}) ->
tc_esc_chars}).
logger(Parent, Mode, Verbosity) ->
+ put(app, common_test),
register(?MODULE,self()),
%%! Below is a temporary workaround for the limitation of
%%! max one test run per second.
@@ -1004,6 +1005,7 @@ print_to_log(async, FromPid, Category, TCGL, Content, EscChars, State) ->
if FromPid /= TCGL ->
IoFun = create_io_fun(FromPid, CtLogFd, EscChars),
fun() ->
+ put(app, common_test),
test_server:permit_io(TCGL, self()),
%% Since asynchronous io gets can get buffered if
@@ -1035,6 +1037,7 @@ print_to_log(async, FromPid, Category, TCGL, Content, EscChars, State) ->
end;
true ->
fun() ->
+ put(app, common_test),
unexpected_io(FromPid, Category, ?MAX_IMPORTANCE,
Content, CtLogFd, EscChars)
end
@@ -3016,6 +3019,7 @@ simulate() ->
cast(stop),
S = self(),
Pid = spawn(fun() ->
+ put(app, common_test),
register(?MODULE,self()),
S ! {self(),started},
simulate_logger_loop()