mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Log support through boost::log
This commit is contained in:
@@ -18,6 +18,8 @@ sub debugf {
|
||||
printf @_ if $debug;
|
||||
}
|
||||
|
||||
our $loglevel = 0;
|
||||
|
||||
# load threads before Moo as required by it
|
||||
our $have_threads;
|
||||
BEGIN {
|
||||
@@ -104,6 +106,10 @@ my $pause_sema = Thread::Semaphore->new;
|
||||
my $parallel_sema;
|
||||
my $paused = 0;
|
||||
|
||||
# Set the logging level at the Slic3r XS module.
|
||||
$Slic3r::loglevel = (defined($ENV{'SLIC3R_LOGLEVEL'}) && $ENV{'SLIC3R_LOGLEVEL'} =~ /^[1-9]/) ? $ENV{'SLIC3R_LOGLEVEL'} : 0;
|
||||
set_logging_level($Slic3r::loglevel);
|
||||
|
||||
sub spawn_thread {
|
||||
my ($cb) = @_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user