From 1dbbfc851350b8134bd679abd8f84a9b222b5261 Mon Sep 17 00:00:00 2001 From: yum Date: Sat, 25 Feb 2023 21:03:22 -0800 Subject: Convert most PythonWrapper wxLogError() to Log() Simplifies debugging process. --- GUI/GUI/GUI/PythonWrapper.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'GUI') diff --git a/GUI/GUI/GUI/PythonWrapper.cpp b/GUI/GUI/GUI/PythonWrapper.cpp index 52f283a..51907b5 100644 --- a/GUI/GUI/GUI/PythonWrapper.cpp +++ b/GUI/GUI/GUI/PythonWrapper.cpp @@ -273,8 +273,8 @@ bool PythonWrapper::InvokeWithArgs(std::vector&& args, return true; } else { - wxLogError("%s: %s", err_msg, py_stderr.c_str()); Log(out, "failed!\n"); + Log(out, "Error: {}: {}\n", err_msg, py_stderr); return false; } } @@ -457,8 +457,9 @@ bool PythonWrapper::GenerateAnimator( } } else { - wxLogError("Failed to generate emotes: %s", py_stderr.c_str()); Log(out, "failed!\n"); + Log(out, "stdout: {}\n", py_stdout.c_str()); + Log(out, "stderr: {}\n", py_stderr.c_str()); return false; } } @@ -474,8 +475,8 @@ bool PythonWrapper::GenerateAnimator( std::error_code error; std::filesystem::copy("Resources/Animations", tastt_animations_path, opts, error); if (error.value()) { - wxLogError("Failed to copy animations: %s (%d)", error.message(), error.value()); Log(out, "failed!\n"); + Log(out, "Error: {} ({})\n", error.message(), error.value()); return false; } Log(out, "success!\n"); @@ -488,8 +489,8 @@ bool PythonWrapper::GenerateAnimator( std::error_code error; std::filesystem::copy("Resources/UnityAssets", tastt_assets_path, opts, error); if (error.value()) { - wxLogError("Failed to copy animations: %s (%d)", error.message(), error.value()); Log(out, "failed!\n"); + Log(out, "Error: {} ({})\n", error.message(), error.value()); return false; } Log(out, "success!\n"); @@ -502,8 +503,8 @@ bool PythonWrapper::GenerateAnimator( std::error_code error; std::filesystem::copy("Resources/Shaders", tastt_shaders_path, opts, error); if (error.value()) { - wxLogError("Failed to copy animations: %s (%d)", error.message(), error.value()); Log(out, "failed!\n"); + Log(out, "Error: {} ({})\n", error.message(), error.value()); return false; } Log(out, "success!\n"); @@ -516,8 +517,8 @@ bool PythonWrapper::GenerateAnimator( std::error_code error; std::filesystem::copy("Resources/Fonts", tastt_fonts_path, opts, error); if (error.value()) { - wxLogError("Failed to copy animations: %s (%d)", error.message(), error.value()); Log(out, "failed!\n"); + Log(out, "Error: {} ({})\n", error.message(), error.value()); return false; } Log(out, "success!\n"); @@ -624,8 +625,8 @@ bool PythonWrapper::GenerateAnimator( Log(out, "success!\n"); } else { - wxLogError("Failed to delete OSC configs: %s", err.message()); Log(out, "failed!\n"); + Log(out, "Error: {} ({})\n", err.message(), err.value()); } } else { -- cgit v1.2.3