scttnlsn / dandelion

Incremental Git repository deployment.
http://scttnlsn.github.io/dandelion
MIT License
738 stars 57 forks source link

Enabling sync for STDOUT so output is written as soon as it is sent. #29

Closed jamesmoss closed 11 years ago

jamesmoss commented 11 years ago

We use a little wrapper around dandelion written in PHP to change the API slightly for our developers and make things a bit more streamline for our deployment process. We use PHP's system function to pipe the output of dandelion into STDOUT.

However, I've noticed that when dandelion's logger is called, the writes are buffered until the entire transfer has taken place, this makes our wrapper script feel a bit unresponsive.

This PR turns on syncing when writing to STDOUT so that output is written as soon as the logger methods are called. This should have negligible impact on performance as dandelion will never create huge amounts of output in normal use.

scttnlsn commented 11 years ago

Great- thanks!