Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-25 Thread Paolo Bonzini
On 10/24/22 11:44, Alex Bennée wrote: Paolo Bonzini writes: If we want to connect stdout/err to something when daemonized then lets either have a dedicated option for that, or simply tell apps not to use -daemonize and to take care of daemonzing themselves, thus having full control over stdo

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-25 Thread Greg Kurz
On Mon, 24 Oct 2022 10:44:11 +0100 Alex Bennée wrote: > > Paolo Bonzini writes: > > > >> If we want to connect stdout/err to something when daemonized > >> then lets either have a dedicated option for that, or simply > >> tell apps not to use -daemonize and to take care of daemonzing > >> the

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-24 Thread Alex Bennée
Paolo Bonzini writes: >> If we want to connect stdout/err to something when daemonized >> then lets either have a dedicated option for that, or simply >> tell apps not to use -daemonize and to take care of daemonzing >> themselves, thus having full control over stdout/err. The latter >> is wha

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-20 Thread Greg Kurz
On Thu, 20 Oct 2022 12:52:21 +0200 Paolo Bonzini wrote: > On 10/20/22 11:58, Daniel P. Berrangé wrote: > > > > The '-d' option enables logging in QEMU, primary for things > > related to TCG. By default that logging goes to stderr, but > > it can be sent to 1 or mnay files, using -D. IOW, -D is N

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-20 Thread Paolo Bonzini
On 10/20/22 11:58, Daniel P. Berrangé wrote: The '-d' option enables logging in QEMU, primary for things related to TCG. By default that logging goes to stderr, but it can be sent to 1 or mnay files, using -D. IOW, -D is NOT about controlling where stderr/out is connected. It is about where TCG

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-20 Thread Daniel P . Berrangé
On Thu, Oct 20, 2022 at 11:49:37AM +0200, Greg Kurz wrote: > On Thu, 20 Oct 2022 12:21:27 +1000 > Richard Henderson wrote: > > > On 10/20/22 01:16, Greg Kurz wrote: > > > > I don't understand why daemonize changes -d tid at all. > > If there's a bug there, please separate it out. > > > > I don'

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-20 Thread Greg Kurz
On Thu, 20 Oct 2022 12:21:27 +1000 Richard Henderson wrote: > On 10/20/22 01:16, Greg Kurz wrote: > > When QEMU is started with `-daemonize`, all stdio descriptors get > > redirected to `/dev/null`. This basically means that anything > > printed with error_report() and friends is lost. > > > > O

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-19 Thread Richard Henderson
On 10/20/22 01:16, Greg Kurz wrote: When QEMU is started with `-daemonize`, all stdio descriptors get redirected to `/dev/null`. This basically means that anything printed with error_report() and friends is lost. One could hope that passing `-D ${logfile}` would cause the messages to go to `${lo

[PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-19 Thread Greg Kurz
When QEMU is started with `-daemonize`, all stdio descriptors get redirected to `/dev/null`. This basically means that anything printed with error_report() and friends is lost. One could hope that passing `-D ${logfile}` would cause the messages to go to `${logfile}`, as the documentation tends to