瀏覽代碼

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.
pull/1158/head
Fred Hebert 9 年之前
父節點
當前提交
251c1447ea
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      src/rebar_prv_shell.erl

+ 3
- 1
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()]),

Loading…
取消
儲存