On 13/04/2015 1:12 a.m., FreeSlave wrote:
On Sunday, 12 April 2015 at 04:39:06 UTC, Philip Stuckey wrote:why not: import std.stdio; stdout = File(args[4], "w+"); stderr = File(args[4], "w+");It just replaces the object, not redirects output. E.g. if you use printf somewhere it will use stdout, not file.
You will need to use writefln instead of printf. As printf uses the processes stdout. Changing this would be tricky and OS based.