Logging Gulp console output to a file
<p>I am using Gulp as a part of a simple build system for processing text and images, and have defined a series of generic tasks for copying, processing, and deleting these files. Both Gulp and the plugins used give a lot of output in the console, but how can this output be preserved in a file?</p>

<p>Ideally, the exact contents of the console would be logged to <code>console.log</code> in the same format as it appeared in the console (without color, as is common in the console):</p>

<pre><code>[13:35:21] Images: 208 items
[13:35:23] gulp-imagemin: Minified 208 images (saved 0 B - 0%)
[13:35:23] Finished 'build:images' after 19 s
[13:35:23] Starting 'clean:responsive'...
[13:35:23] Deleting /responsive/**/*
[13:35:23] Finished 'clean:responsive' after 171 ms
[13:35:23] Starting 'default'...
[13:35:23] Finished 'default' after 57 μs
</code></pre>

<p>Many of the Gulp plugins focused on logging seem to mainly do this in the console, which is already achieved, and only <a href="https://github.com/mikeerickson/gulp-messenger" rel="nofollow">gulp-messenger</a> saved it to text (as json). Can this be achieved with for example <a href="https://github.com/gulpjs/gulp-util" rel="nofollow">gulp-util</a>?</p>