Open fishxz opened 5 years ago
stdin
can't be null
according to current logic. Use something that blocks forever and doesn't output anything. According to the systemd docs there's no particular way to do that. But that shell invocation seems to work even if its own stdin
is duplicated from a /dev/null
descriptor:
/bin/sh -c 'while sleep 3600; do :; done | ./q2proded +set sys_console 1 +map q2dm1'
It's probably better if set sys_console 2
ignored null input but that's a workaround that works right now.
so after q2proded started, the output goes to null
? is this intended and why is it like that?
The input comes from /dev/null
due to systemd and that's what's tripping up the console logic. Actually I have some time to fix the tty code since I've already worked on it.
The code's intention seems to be to avoid polluting .xsession-errors
with output once xterm detaches. But this seems consistent with this intention:
./q2proded +set sys_console 1 +map q2dm1
(patch moved to pull requests)
it would be great if logfile_prefix
would work in console aswell, otherwise using it is not a good replacement for the old way to log.
External logger usually adds its own timestamps to messages. Isn't that enough?
i have set logfile_prefix "@ [%Y-%m-%d %H:%M] "
. the @
makes it easy to identify the content of the line and let me easy grep
for textchat only.
@fishxz I don't recommend the overhead of systemd's journal (vs appending to a flat file) for really no benefit. You can "rotate" a flat-file log by truncating the file in-place.
hey, it seems there is a problem with logging to the journal.
i only get an ouput there, when i set "sys_console 1" and only the start process of q2pro.
after this no new messages will appear!
also i tried every possible "StandardOutput=" in my service file, without luck..