Connecting via release `remote` command does not print errors

I built a release of my Phoenix app with mix release command.

When I start it with path/to/release/myapp start, I can see requests and errors happening in real time in the console.

However, when I connect to already running app with path/to/release/myapp remote, I’m dropped into iex session as expected, but it’s completely silent - no errors or requests are shown.

How do I see errors in this remote session?

It’s because the group leader is already set to the starting process, so You don’t see in the remote.

You could potentially redirect to the remote, but it is not advised.

You can also use file logger backend, and have them in files…

You could potentially redirect to the remote, but it is not advised.

@kokolegorille Can you please elaborate ? How can you redirect the output to the remote console ?
I’m having the same problem (not seeing logs) debugging on a ‘staging’ server so the impact is not big.