mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
More tracing of the slicing process.
This commit is contained in:
parent
062a6628e5
commit
4d00aa1800
8 changed files with 60 additions and 9 deletions
|
@ -9,11 +9,17 @@ static boost::log::trivial::severity_level logSeverity = boost::log::trivial::fa
|
|||
void set_logging_level(unsigned int level)
|
||||
{
|
||||
switch (level) {
|
||||
// Report fatal errors only.
|
||||
case 0: logSeverity = boost::log::trivial::fatal; break;
|
||||
// Report fatal errors and errors.
|
||||
case 1: logSeverity = boost::log::trivial::error; break;
|
||||
// Report fatal errors, errors and warnings.
|
||||
case 2: logSeverity = boost::log::trivial::warning; break;
|
||||
// Report all errors, warnings and infos.
|
||||
case 3: logSeverity = boost::log::trivial::info; break;
|
||||
// Report all errors, warnings, infos and debugging.
|
||||
case 4: logSeverity = boost::log::trivial::debug; break;
|
||||
// Report everyting including fine level tracing information.
|
||||
default: logSeverity = boost::log::trivial::trace; break;
|
||||
}
|
||||
|
||||
|
@ -23,6 +29,28 @@ void set_logging_level(unsigned int level)
|
|||
);
|
||||
}
|
||||
|
||||
void trace(unsigned int level, const char *message)
|
||||
{
|
||||
boost::log::trivial::severity_level severity = boost::log::trivial::trace;
|
||||
switch (level) {
|
||||
// Report fatal errors only.
|
||||
case 0: severity = boost::log::trivial::fatal; break;
|
||||
// Report fatal errors and errors.
|
||||
case 1: severity = boost::log::trivial::error; break;
|
||||
// Report fatal errors, errors and warnings.
|
||||
case 2: severity = boost::log::trivial::warning; break;
|
||||
// Report all errors, warnings and infos.
|
||||
case 3: severity = boost::log::trivial::info; break;
|
||||
// Report all errors, warnings, infos and debugging.
|
||||
case 4: severity = boost::log::trivial::debug; break;
|
||||
// Report everyting including fine level tracing information.
|
||||
default: severity = boost::log::trivial::trace; break;
|
||||
}
|
||||
|
||||
BOOST_LOG_STREAM_WITH_PARAMS(::boost::log::trivial::logger::get(),\
|
||||
(::boost::log::keywords::severity = severity)) << message;
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#ifdef SLIC3R_HAS_BROKEN_CROAK
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue