mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-05 16:20:49 +08:00
Added generic error message to Log; print error type to console.
This commit is contained in:
parent
a620e2ee13
commit
574f77ec16
@ -8,17 +8,21 @@ namespace Slic3r {
|
|||||||
class Log {
|
class Log {
|
||||||
public:
|
public:
|
||||||
static void fatal_error(std::string topic, std::wstring message) {
|
static void fatal_error(std::string topic, std::wstring message) {
|
||||||
std::cerr << topic << ": ";
|
std::cerr << topic << " FERR" << ": ";
|
||||||
|
std::wcerr << message << std::endl;
|
||||||
|
}
|
||||||
|
static void error(std::string topic, std::wstring message) {
|
||||||
|
std::cerr << topic << " ERR" << ": ";
|
||||||
std::wcerr << message << std::endl;
|
std::wcerr << message << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void info(std::string topic, std::wstring message) {
|
static void info(std::string topic, std::wstring message) {
|
||||||
std::clog << topic << ": ";
|
std::clog << topic << " INFO" << ": ";
|
||||||
std::wclog << message << std::endl;
|
std::wclog << message << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void warn(std::string topic, std::wstring message) {
|
static void warn(std::string topic, std::wstring message) {
|
||||||
std::cerr << topic << ": ";
|
std::cerr << topic << " WARN" << ": ";
|
||||||
std::wcerr << message << std::endl;
|
std::wcerr << message << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user