From a219ae3d27b9ca6ce6df5297e3a0c0f00848a9d9 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 3 Mar 2017 14:38:25 +0100 Subject: [PATCH] Set boost tracing level on DLL initialization to errors only. --- xs/src/libslic3r/utils.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xs/src/libslic3r/utils.cpp b/xs/src/libslic3r/utils.cpp index 828ece50f..50db6f300 100644 --- a/xs/src/libslic3r/utils.cpp +++ b/xs/src/libslic3r/utils.cpp @@ -4,7 +4,7 @@ namespace Slic3r { -static boost::log::trivial::severity_level logSeverity = boost::log::trivial::fatal; +static boost::log::trivial::severity_level logSeverity = boost::log::trivial::error; void set_logging_level(unsigned int level) { @@ -29,6 +29,11 @@ void set_logging_level(unsigned int level) ); } +// Force set_logging_level(<=error) after loading of the DLL. +static struct SetLoggingLevelOnInit { + SetLoggingLevelOnInit() { set_logging_level(1); } +} g_SetLoggingLevelOnInit; + void trace(unsigned int level, const char *message) { boost::log::trivial::severity_level severity = boost::log::trivial::trace;