# How to redirect messages from worker procecces into \`stderr\` on the master procecces

**URL:** <https://discourse.julialang.org/t/how-to-redirect-messages-from-worker-procecces-into-stderr-on-the-master-procecces/111000>\
**Category:** General Usage\
**Tags:** parallel, distributed, io\
**Created:** [March 1, 2024, 8:30am UTC](https://discourse.julialang.org/t/how-to-redirect-messages-from-worker-procecces-into-stderr-on-the-master-procecces/111000 "2024-03-01T08:30:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdyuki](https://avatars.discourse-cdn.com/v4/letter/m/74df32/32.png) [@mdyuki](https://discourse.julialang.org/u/mdyuki)\
**Post date:** [March 1, 2024, 8:30am UTC](https://discourse.julialang.org/t/how-to-redirect-messages-from-worker-procecces-into-stderr-on-the-master-procecces/111000/1 "2024-03-01T08:30:40Z")

</div>

Hello, I am writing a program that uses `Distributed` package for parallelization. I have a question about messages passed from the workers to master. It seems to be printed on the `stdout`, even if the message is originally passed to `stderr` stream. Can I put such messages intended to print to `stderr` from workers to `stderr` on the master?

Simple example is here (`example.jl`):

```julia
using Distributed
addprocs(1) # add worker process
remotecall_fetch(()->println(stderr, "some errorr messages"), 2, )

```

After running `julia example.jl >out.txt, 2>error.txt`, the `error.txt` is blank and `out.txt` contains

```julia
      From worker 2:	some error messages

```

I want to redirect this messsages to `stderr`, and `error.txt` should contain the line:

```julia
some error messages

```

How can I implement this? I cannot do that?  
Thank you.
