diff options
author | Tristan Sloughter <t@crashfast.com> | 2016-04-30 08:26:03 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2016-04-30 08:26:03 -0500 |
commit | b11d1594c38f21a27e0b33e76a1e95e61dc45acb (patch) | |
tree | 091c7a4e79cf61373ea27749d0b75bc3fc7f3164 | |
parent | c11cf0b0754d0d20de51cfb459cd43b708ba5749 (diff) | |
parent | 251c1447ea68b4ffb28b1ae5f66061751c3f5a2c (diff) |
Merge pull request #1158 from ferd/fix-remote-shell-logger
Fixes logging from remote shells in rebar3 shell
-rw-r--r-- | src/rebar_prv_shell.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rebar_prv_shell.erl b/src/rebar_prv_shell.erl index ab496c6..0ede495 100644 --- a/src/rebar_prv_shell.erl +++ b/src/rebar_prv_shell.erl @@ -192,7 +192,9 @@ rewrite_leaders(OldUser, NewUser) -> %% disable the simple error_logger (which may have been added multiple %% times). removes at most the error_logger added by init and the %% error_logger added by the tty handler - remove_error_handler(3) + remove_error_handler(3), + %% reset the tty handler once more for remote shells + error_logger:swap_handler(tty) catch E:R -> % may fail with custom loggers ?DEBUG("Logger changes failed for ~p:~p (~p)", [E,R,erlang:get_stacktrace()]), |