mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 23:23:59 -06:00
Log support through boost::log
This commit is contained in:
parent
e67e37c772
commit
0d20a81354
5 changed files with 64 additions and 1 deletions
|
@ -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) = @_;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue