update logging and add pl splash as the main one
All checks were successful
Build / Build Launcher (push) Successful in 2m31s

This commit is contained in:
zznty
2024-05-31 17:12:08 +07:00
parent fc69ee8e83
commit 9fb29d2011
28 changed files with 364 additions and 318 deletions

View File

@@ -58,7 +58,7 @@ public class LocalFolderPlugin : PluginData
if (hasFile)
{
sb.Length -= 2;
LogFile.WriteLine(sb.ToString());
LogFile.Log.Debug(sb.ToString());
}
else
{
@@ -109,27 +109,11 @@ public class LocalFolderPlugin : PluginData
.Where(x => File.Exists(x));
}
var sb = new StringBuilder("An error occurred while checking git for project files.").AppendLine();
if (!string.IsNullOrWhiteSpace(gitError))
{
sb.AppendLine("Git output: ");
sb.Append(gitError).AppendLine();
}
LogFile.WriteLine(sb.ToString());
LogFile.Log.Error("An error occurred while checking git for project files. Git output: {GitOutput}", gitError);
}
catch (Exception e)
{
var sb = new StringBuilder("An error occurred while checking git for project files.").AppendLine();
if (!string.IsNullOrWhiteSpace(gitError))
{
sb.AppendLine(" Git output: ");
sb.Append(gitError).AppendLine();
}
sb.AppendLine("Exception: ");
sb.Append(e).AppendLine();
LogFile.WriteLine(sb.ToString());
LogFile.Log.Error(e, "An error occurred while checking git for project files. Git output: {GitOutput}", gitError);
}
@@ -223,7 +207,7 @@ public class LocalFolderPlugin : PluginData
}
catch (Exception e)
{
LogFile.WriteLine("Error while reading the xml file: " + e);
LogFile.Log.Error(e, "Error while reading the xml file");
}
}