Hi Martin,

I have tried to fix this myself for the reason you gave and because output from stderr and stdout become interleaved in my logs because sys.stdout is flushed on block (rather than line) boundaries. This makes automatic analysis of the log files very difficult. I have tried two things:

1. Set sys.stdout = sys.stderr

2. Flush sys.stdout before writing to sys.stderr. (This is easy for me because all my logging goes via one utility function.)

Both of these techniques will fix the first problem, but there is still some interleaving in the log file because ThreadedAppServer prints log lines in multiple parts. e.g. it will print the line

 640  0.00 secs            /v003/?_s=airservices&_id=check_working.remote

using two different print statements. Because two print statements are used, sys.stdout.write() is called twice, which leaves opportunity for another thread to add something to the log file in between. It would be nice if WebKit saved up its information until it had an entire line ready to print. Unfortunately I haven't yet bitten the bullet and moved from 0.81 so I don't want to fiddle with that code.


  Oliver

--
Martin Matusiak wrote:

Is there some way I can get webkit to stop buffering the log file? I'm printing various things to stdout as a method of debugging and sometimes I have to restart the daemon twice before I get the output I'm waiting for.

I'm running webware 0.8.1


Martin


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to