Re: puts doesn't show up in multilog

Daryl Tester <[email protected]> Fri, 14 Aug 2009 08:32:48 +0930
Newsgroups gmane.comp.djb.syslog
Message-ID <[email protected]>
richard lucassen wrote:

> Ok, unfortunately I'm not a programmer, but searching a bit the web I
> think this would be the line I need:
> 
> setvbuf ( stdout , NULL , _IONBF , 0 );
> 
> It works, but is the line correct?

Apart from the excessive white space, yes.  :-)  Setting stdout to
either _IONBF (unbuffered) or _IOLBF (line buffered) should achieve
what you want, as from memory multilog only processes whole lines
anyway (stdout is in _IOLBF mode when the program is talking to a
tty).

Note that if you had been writing to stderr you wouldn't have picked
this up - by default stderr is set to unbuffered regardless of what
it's talking to.


Cheers.

-- 
Regards,
  Daryl Tester

"Crush! Kill! Deploy!"  -- Lost In Space I.T. Dept.