[erlang-questions] Hijacking console output

Vlad Dumitrescu vladdu55@REDACTED
Fri Nov 3 10:27:33 CET 2006


Hello,

I would like to be able to redirect all console output to my own
handler. If I understand the code properly, a way to achieve this is
by starting the runtime with something amounting to

    erl -run user start "[MyMod, MyFun, MyArgs]"

where MyMod:MyFun(MyArgs) returns a pid that will act as the new driver.

Is this correct? Implementing the stuff just to find out it's not the
right way wouldn't be too pleasant :-)

The above would miss erlang:display() output, of course, and probably
all printouts from the boot process (but I guess this can be lived
with).

best regards,
Vlad



More information about the erlang-questions mailing list