fix: prevent warning if no logging config is set

If no logging config is set, there's a warning saying:

> Using deprecated logging configuration.

However, if they didn't set any config, it's not deprecated.
This commit is contained in:
Steven Nguyen
2025-03-07 12:54:28 -08:00
parent 3af7f0aa3d
commit 0fbd2c6425
+4
View File
@@ -817,6 +817,10 @@ $register->set('logger', function () {
$providerName = System::getEnv('_APP_LOGGING_PROVIDER', '');
$providerConfig = System::getEnv('_APP_LOGGING_CONFIG', '');
if (empty($providerConfig)) {
return;
}
try {
$loggingProvider = new DSN($providerConfig ?? '');