Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes logging from remote shells in rebar3 shell #1158

Merged
merged 1 commit into from
Apr 30, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixes logging from remote shells in rebar3 shell
Somehow swapping the tty handler once more fixes everything. I guess we
were missing a step somehow.
  • Loading branch information
ferd committed Apr 14, 2016
commit 251c1447ea68b4ffb28b1ae5f66061751c3f5a2c
4 changes: 3 additions & 1 deletion src/rebar_prv_shell.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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()]),
Expand Down