mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-31 05:49:12 -07:00
Http & ErrorDialog: Improve error reporting
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
namespace Slic3r {
|
||||
|
||||
extern void set_logging_level(unsigned int level);
|
||||
extern unsigned get_logging_level();
|
||||
extern void trace(unsigned int level, const char *message);
|
||||
// Format memory allocated, separate thousands by comma.
|
||||
extern std::string format_memsize_MB(size_t n);
|
||||
|
||||
@@ -59,6 +59,18 @@ void set_logging_level(unsigned int level)
|
||||
);
|
||||
}
|
||||
|
||||
unsigned get_logging_level()
|
||||
{
|
||||
switch (logSeverity) {
|
||||
case boost::log::trivial::fatal : return 0;
|
||||
case boost::log::trivial::error : return 1;
|
||||
case boost::log::trivial::warning : return 2;
|
||||
case boost::log::trivial::info : return 3;
|
||||
case boost::log::trivial::debug : return 4;
|
||||
default: return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Force set_logging_level(<=error) after loading of the DLL.
|
||||
// Switch boost::filesystem to utf8.
|
||||
static struct RunOnInit {
|
||||
|
||||
Reference in New Issue
Block a user