[erlang-questions] Redirecting stdout in erlang

SurferJeff <>
Wed Jan 23 07:18:21 CET 2013


Is that how it works?  One would implement an io_server process, and then 
call erlang:group_leader(MyIoServer, self()) or the like?
 
If so, that's great!  But, I found nothing in the group_leader 
documentation nor the io protocol documentation linked to below that 
describes these details.  I thought one would call 
erlang:group_leader(AnyOtherPid, self()) or the like, and self() would 
effectively inherit stdin and stdout from AnyOtherPid.

On Friday, December 14, 2012 8:48:33 AM UTC-8, Attila Rajmund Nohl wrote:

> Hello! 
>
> I think you have to implement an "io_server" process and set it with 
> erlang:group_leader/2. I think this is the relevant documentation: 
> http://erlang.org/doc/apps/stdlib/io_protocol.html 
>
> 2012/12/14 Roberto Majadas Lopez < <javascript:>>: 
>
> > No i don't need a logger system. I need a way to redirect all standard 
> > output strings written with io:format, including from other source code. 
> > 
> > 
> > 
> > 2012/12/14 Yu-ri Cho < <javascript:>> 
> >> 
> >> Maybe lager is what you want 
> >> https://github.com/basho/lager 
> >> 
> >> On Fri, Dec 14, 2012 at 10:57 AM, Roberto Majadas Lopez 
> >> < <javascript:>> wrote: 
> >>> 
> >>> 
> >>> Hello, 
> >>> 
> >>> I want to redirect all io:format outputs to one gen_server or similar. 
> >>> How can i do it in erlang? 
> >>> 
> >>> Roberto 
> >>> 
> >>> _______________________________________________ 
> >>> erlang-questions mailing list 
> >>>  <javascript:> 
> >>> http://erlang.org/mailman/listinfo/erlang-questions 
> >>> 
> >> 
> >> 
> >> 
> >> -- 
> >> Yu-ri Gordon 
> >> trueEX Group LLC 
> >> 646-786-8520 
> >> 
> >> 
> >> CONFIDENTIALITY NOTICE 
> >> 
> >> THE INFORMATION CONTAINED IN THIS COMMUNICATION IS INTENDED FOR THE 
> NAMED 
> >> RECEIVER ONLY. THE TRANSMISSION MAY CONTAIN PRIVILEGED AND CONFIDENTIAL 
> >> MATERIAL. IF YOU ARE NOT THE NAMED RECIPIENT, PLEASE BE ADVISED THAT 
> ANY 
> >> USE, DISSEMINATION OR UNAUTHORIZED COPYING OF THE MATERIAL IS STRICTLY 
> >> PROHIBITED. IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE 
> NOTIFY 
> >>  <javascript:> AND DESTROY THE RECEIVED COPY. THANK 
> YOU. 
> > 
> > 
> > 
> > 
> > -- 
> > Roberto Majadas 
> > OpenShine S.L 
> > 
> > email :  <javascript:> 
> > tlf : +34 663 273 501 
> > 
> > www.openshine.com 
> > 
> > 
> > _______________________________________________ 
> > erlang-questions mailing list 
> >  <javascript:> 
> > http://erlang.org/mailman/listinfo/erlang-questions 
> > 
> _______________________________________________ 
> erlang-questions mailing list 
>  <javascript:> 
> http://erlang.org/mailman/listinfo/erlang-questions 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130122/3a7ce1bf/attachment.html>


More information about the erlang-questions mailing list