Updated Logger class to not register error handlers if it's in a testing environment
Some checks are pending
CI / release (push) Waiting to run
CI / debug (push) Waiting to run
CI / release_executable (push) Waiting to run
CI / debug_executable (push) Waiting to run
CI / check-phpunit (push) Waiting to run
CI / check-phpdoc (push) Waiting to run
CI / generate-phpdoc (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / release-documentation (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions

This commit is contained in:
netkas 2025-03-18 15:00:09 -04:00
parent 508d82cf92
commit fef9383dd2
Signed by: netkas
GPG key ID: 4D8629441B76E4CC

View file

@ -15,7 +15,12 @@
if(self::$logger === null) if(self::$logger === null)
{ {
self::$logger = new \LogLib2\Logger(Configuration::getInstanceConfiguration()->getName()); self::$logger = new \LogLib2\Logger(Configuration::getInstanceConfiguration()->getName());
\LogLib2\Logger::registerHandlers();
// Don't register handlers if we are testing. This conflicts with PHPUnit.
if(!defined('SB_TEST'))
{
\LogLib2\Logger::registerHandlers();
}
} }
return self::$logger; return self::$logger;