diff --git a/CompilePalX/Compiling/CompilingManager.cs b/CompilePalX/Compiling/CompilingManager.cs index 3b6c1b9..a823bfa 100644 --- a/CompilePalX/Compiling/CompilingManager.cs +++ b/CompilePalX/Compiling/CompilingManager.cs @@ -189,6 +189,9 @@ private static void CompileThreaded(CancellationToken cancellationToken) ProgressManager.Progress += (1d / ConfigurationManager.CompileProcesses.Count(c => c.Metadata.DoRun && c.PresetDictionary.ContainsKey(ConfigurationManager.CurrentPreset))) / MapFiles.Count; + + // log empty line to make a space inbetween compile step logs + CompilePalLogger.LogLine(); } mapErrors.Add(new MapErrors { MapName = cleanMapName, Errors = compileErrors }); @@ -205,7 +208,7 @@ private static void CompileThreaded(CancellationToken cancellationToken) private static void postCompile(List errors) { CompilePalLogger.LogLineColor( - $"\n'{ConfigurationManager.CurrentPreset!.Name}' compile finished in {compileTimeStopwatch.Elapsed.ToString(@"hh\:mm\:ss")}", (Brush) Application.Current.TryFindResource("CompilePal.Brushes.Success")); + $"'{ConfigurationManager.CurrentPreset!.Name}' compile finished in {compileTimeStopwatch.Elapsed.ToString(@"hh\:mm\:ss")}", (Brush) Application.Current.TryFindResource("CompilePal.Brushes.Success")); if (errors != null && errors.Any()) { diff --git a/CompilePalX/Compiling/Logger.cs b/CompilePalX/Compiling/Logger.cs index 05d6749..dab3315 100644 --- a/CompilePalX/Compiling/Logger.cs +++ b/CompilePalX/Compiling/Logger.cs @@ -124,6 +124,10 @@ public static void LogCompileError(string errorText, Error e) File.AppendAllText(logFile, errorText); OnErrorFound(e); } + public static void LogLineCompileError(string errorText, Error e) + { + LogCompileError(errorText + Environment.NewLine, e); + } private static Dictionary errorsFound = new (); @@ -141,7 +145,7 @@ public static void LogProgressive(string s) } // Log has completed at least 1 line, process it further - List lines = lineBuffer.ToString().Split('\n').ToList(); + List lines = lineBuffer.ToString().Split("\r\n").ToList(); string suffixText = lines.Last(); @@ -155,9 +159,9 @@ public static void LogProgressive(string s) Error? error = ErrorFinder.GetError(line); if (error == null) - Log(line); + LogLine(line); else - LogCompileError(line, error); + LogLineCompileError(line, error); } if (suffixText.Length > 0)