From bcfb445d0c70aa6daa332ea3317b1c70c4565873 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 8 Aug 2019 15:24:23 +0200 Subject: [PATCH] Partial revert of f474978db5519d501c0ad91439b56f5acedf1b99 to fix Perl driven unit tests. --- src/libslic3r/utils.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp index 2e917ea57..8fcd611ac 100644 --- a/src/libslic3r/utils.cpp +++ b/src/libslic3r/utils.cpp @@ -91,6 +91,15 @@ unsigned get_logging_level() } } +// Force set_logging_level(<=error) after loading of the DLL. +// This is currently only needed if libslic3r is loaded as a shared library into Perl interpreter +// to perform unit and integration tests. +static struct RunOnInit { + RunOnInit() { + set_logging_level(1); + } +} g_RunOnInit; + void trace(unsigned int level, const char *message) { boost::log::trivial::severity_level severity = level_to_boost(level);