Thanks.

My question is more on STDOUT of any other process, specially if it is non 
java.

On Saturday, March 19, 2016 at 6:54:51 AM UTC-5, Konrad Malawski wrote:
>
> Hi there,
>
> Please don't *immediately* cross post your questions here and stack 
> overflow 
> <http://stackoverflow.com/questions/36096694/intercept-stdout-and-stream-via-akka/36101376#36101376>,
>  
> it makes it harder to track answered questions. It's ok to cross post if 
> after a while you did not receive an answer, but please don't do so 
> immediately.
>
>
> In order to "intercept" stdout in Java you can setOut on the System object. 
> It takes a PrintWriter, which we are able to create by wrapping an 
> OutputStream "bridge" that Akka Streams provide, here's how:
>
>  val is: OutputStream = StreamConverters.asOutputStream()
>    .to(Sink.foreach(println)) // your logic pipeline here
>    .run()
>  System.setOut(new PrintStream(is))
>
>
> -- 
> Konrad
> Akka @ Lightbend
>
> W dniu sobota, 19 marca 2016 01:29:33 UTC+1 użytkownik Arun Sethia napisał:
>>
>> Hi,
>>
>> Is it possible to intercept STDOUT of any other process and stream them 
>> via akka streaming?
>>
>> Thanks
>> Arun
>>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to