Improve debugging output

This commit is contained in:
Noisyfox 2024-09-05 09:45:59 +08:00
parent c179a57725
commit 63ebebf4a0
3 changed files with 18 additions and 15 deletions

View file

@ -301,6 +301,9 @@ std::string debug_out_path(const char *name, ...)
static constexpr const char *SLIC3R_DEBUG_OUT_PATH_PREFIX = "out/";
if (! debug_out_path_called.exchange(true)) {
std::string path = boost::filesystem::system_complete(SLIC3R_DEBUG_OUT_PATH_PREFIX).string();
if (!boost::filesystem::exists(path)) {
boost::filesystem::create_directory(path);
}
printf("Debugging output files will be written to %s\n", path.c_str());
}
char buffer[2048];