/// <summary> /// Starts to clone the console output to a specified file. /// <para>If the logging is active the old instance is replaced by a new one.</para> /// </summary> /// <param name="fileName">Log-file name</param> /// <param name="append">True to append to an existing file, false to overwrite it.</param> public static void StartConsoleLogging(string fileName, bool append) { StopConsoleLogging(); combinedWriter = new CombinedWriter(fileName, append, Console.Out); Console.SetOut(combinedWriter); }