On 2 February 2017 at 21:12, Lubomir I. Ivanov <neolit123 at gmail.com> wrote: > const char *location = logfile ? "subsurface.log" : "CON"; > > console_desc.out = freopen(location, "w", stdout); > console_desc.err = freopen(location, "w", stderr); ^ this *probably* won't work for stderr, though. i did not try it. lubomir --