From ad46bc81060fe368688db61e123a8ecd17dbd011 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sat, 28 Apr 2018 18:13:51 -0500 Subject: [PATCH] Start a simple Slic3r::Log to collect all of the debugging prints to a single area. Upgrade backend to boost::log as needed. --- xs/src/libslic3r/Log.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 xs/src/libslic3r/Log.hpp diff --git a/xs/src/libslic3r/Log.hpp b/xs/src/libslic3r/Log.hpp new file mode 100644 index 000000000..554b560a2 --- /dev/null +++ b/xs/src/libslic3r/Log.hpp @@ -0,0 +1,24 @@ +#ifndef slic3r_LOG_HPP +#define slic3r_LOG_HPP + +#include + +namespace Slic3r { + +class Log { +public: + static void fatal_error(std::string topic, std::wstring message) { + std::cerr << topic << ": "; + std::wcerr << message << std::endl; + } + + static void info(std::string topic, std::wstring message) { + std::clog << topic << ": "; + std::wclog << message << std::endl; + } + +}; + +} + +#endif // slic3r_LOG_HPP