Esempio n. 1
0
        private static void WriteLogFile(Options options)
        {
            var logFilePath = Path.Combine(options.LogFilesOutputDirectory, "runtests.log");

            try
            {
                using (var writer = new StreamWriter(logFilePath, append: false))
                {
                    Logger.WriteTo(writer);
                }
            }
            catch (Exception ex)
            {
                ConsoleUtil.WriteLine($"Error writing log file {logFilePath}");
                ConsoleUtil.WriteLine(ex.ToString());
            }

            Logger.Clear();
        }
Esempio n. 2
0
        private static void WriteLogFile(Options options)
        {
            var fileName = Path.Combine(Path.GetDirectoryName(options.Assemblies.First()), "runtests.log");

            using (var writer = new StreamWriter(fileName, append: false))
            {
                Logger.WriteTo(writer);
            }

            // This is deliberately being checked in on a temporary basis.  Need to see how this data behaves in the commit
            // queue and the easiest way is to dump to the console.  Once the commit queue behavior is verified this will
            // be deleted.
            if (Constants.IsJenkinsRun)
            {
                Logger.WriteTo(Console.Out);
            }

            Logger.Clear();
        }
Esempio n. 3
0
        private static void WriteLogFile(Options options)
        {
            var logFilePath = options.LogFilePath;

            if (string.IsNullOrEmpty(logFilePath))
            {
                return;
            }

            try
            {
                using (var writer = new StreamWriter(logFilePath, append: false))
                {
                    Logger.WriteTo(writer);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error writing log file {logFilePath}");
                Console.WriteLine(ex);
            }

            Logger.Clear();
        }