Since I have no idea what the correct way to do that is, and no one on God's Green Earth can explain it, I'll try it the 3 ways I've seen so far.$ cat run
#!/bin/sh
exec 2 > poo.txt
exec chpst -u ssh-chat /usr/bin/ssh-chat --bind=[ip]:[port] --identity=/path/to/chat/server/key/file --motd=/path/to/motd.txt --allowlist=/path/to/allowlist
$ sudo sv start ssh-chat
timeout: down: ssh-chat: 1s, normally up, want up
$ cat poo.txt
$
$ cat run
#!/bin/sh
exec chpst -u ssh-chat /usr/bin/ssh-chat --bind=[ip]:[port] --identity=/path/to/chat/server/key/file --motd=/path/to/motd.txt --allowlist=/path/to/allowlist 2 > poo.txt
$ sudo sv start ssh-chat
timeout: down: ssh-chat: 1s, normally up, want up
$ cat poo.txt
$
$ cat run
#!/bin/sh
exec chpst -u ssh-chat /usr/bin/ssh-chat --bind=[ip]:[port] --identity=/path/to/chat/server/key/file --motd=/path/to/motd.txt --allowlist=/path/to/allowlist
$ sudo sv start ssh-chat 2 > poo.txt
$ cat poo.txt
fail: 2: unable to change to service directory: file does not exist
timeout: down: ssh-chat: 1s, normally up, want up
$
This last one is the only one actually redirecting anything, but clearly not as intended. It seems to be redirecting stdout into the file. The top two result in an empty poo.txt, 0 bytes. It looks like sv is trying to start two services. One named ssh-chat and one named 2. Can't change to 2's service directory, because that's not a thing. The familiar useless, fake error then follows in the file instead of stdout. Nothing more has been discovered.
https://linuxize.com/post/bash-redirect-stderr-stdout/
This is what I'm working from. It assumes bash, this is sh I guess? I don't know if that matters. Probably. Who knows... I should have gone to bed 4 hours ago.
Why would such extreme efforts be made to block failure mode diagnostics? I can't take it seriously... This is ridiculous. If there's an error, print it on the damn screen. Adults have work to do.
Knock it all you want, at least Windows ME would make a loud noise and throw a pop-up on your screen telling you what the problem was, with a giant red x on it. No secret inspector gadget decoder ring needed to find that error message. A huge advantage over this disastertastrophe...