Re: s6 problems logging

2019-01-28 Thread Peter Pentchev
On Sun, Jan 27, 2019 at 02:27:10PM -0500, Roger Pate wrote: > On Sun, Jan 27, 2019 at 1:56 PM Sean MacLennan wrote: > > So it seems that s6-log does not like buffered output. I modified > > doorknob to vsnprintf into a buffer and then tried various output > > methods. > > s6-log (or another

Re: s6 problems logging

2019-01-27 Thread Guillermo
Hello, El dom., 27 ene. 2019 a las 15:56, Sean MacLennan escribió: > > So it seems that s6-log does not like buffered output. It probably isn't that it doesn't like it, but that it doesn't even get to see the output. As Jonathan also pointed out, when you run doorknob using a supervision suite,

Re: s6 problems logging

2019-01-27 Thread Roger Pate
On Sun, Jan 27, 2019 at 1:56 PM Sean MacLennan wrote: > So it seems that s6-log does not like buffered output. I modified > doorknob to vsnprintf into a buffer and then tried various output > methods. s6-log (or another program) has no idea about your buffered output. Output cannot be read until

Re: s6 problems logging

2019-01-27 Thread Sean MacLennan
So it seems that s6-log does not like buffered output. I modified doorknob to vsnprintf into a buffer and then tried various output methods. 1. puts(msg) Failed as expected (basically the same as vprintf). 2. write(1, msg, strlen(msg)) Worked! So non-buffered ok. 3. fputs(msg, stderr) Then add

Re: s6 problems logging

2019-01-27 Thread Colin Booth
On Sun, Jan 27, 2019 at 11:47:51AM -0500, Sean MacLennan wrote: > On Sun, 27 Jan 2019 05:20:00 + > Colin Booth wrote: > > > Everything looks fine from over here. Does running doorknob with -fs > > from the terminal do what you expect? > > Yup, I get a log message to the console when I send

Re: s6 problems logging

2019-01-27 Thread Laurent Bercot
Yup, I get a log message to the console when I send an email. Try stracing doorknob: "strace -v -s 256 /usr/sbin/doorknob -fs" in your run script. Check that the messages it's sending to its stdout are properly terminated with a newline or null character. (Messages sent to the console will

Re: s6 problems logging

2019-01-27 Thread Sean MacLennan
On Sun, 27 Jan 2019 05:20:00 + Colin Booth wrote: > Everything looks fine from over here. Does running doorknob with -fs > from the terminal do what you expect? Yup, I get a log message to the console when I send an email. > Also, what does > `s6-svstat PATH_TO_DOORKNOB_SVCDIR' and >

Re: s6 problems logging

2019-01-26 Thread Colin Booth
On Sat, Jan 26, 2019 at 10:15:17PM -0500, Sean MacLennan wrote: > I have a service called doorknob that I want to log the output of. Here > is the run file: > > #!/command/execlineb -P > /usr/sbin/doorknob -fs > > The -f keeps doorknob in the foreground and the -s sends all messages > to stdout.

s6 problems logging

2019-01-26 Thread Sean MacLennan
I have a service called doorknob that I want to log the output of. Here is the run file: #!/command/execlineb -P /usr/sbin/doorknob -fs The -f keeps doorknob in the foreground and the -s sends all messages to stdout. The log/run file is: #!/command/execlineb -P s6-log -b n20 s100 t . My