mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 08:41:11 -06:00
Http & ErrorDialog: Improve error reporting
This commit is contained in:
parent
bb5caf2e08
commit
ec9caae622
6 changed files with 62 additions and 15 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue