<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">the issue has me really stumped. how/why would the output from perl<br>
make it to /opt/syslog-ng/logs/logfile in "real-time" yet, the<br>
output from python only make it to /opt/syslog-ng/logs/logfile as a<br>
batch upon stopping the service!?!?<div><div class="h5"></div></div></blockquote><div><br></div><div>This sort of thing typically happens because the program is using buffered IO, and output is only flushed when the buffer is full. If you were to leave things running for a while and generate a lot of log traffic, you would probably see the output show up periodically in large chunks.</div>
<div><br></div><div> This thread on Stackoverflow discusses a variety of solutions to the problem:</div><div><br></div><div> <a href="http://stackoverflow.com/questions/107705/python-output-buffering">http://stackoverflow.com/questions/107705/python-output-buffering</a></div>
<div><br></div><div>The simplest is probably to run Python with the "-u" flag (or output to stderr instead of stdout).</div><meta http-equiv="content-type" content="text/html; charset=utf-8"></div><br>