You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returntap($this->createEmergencyLogger(), function ($logger) use ($e) {
$logger->emergency('Unable to create configured logger. Using emergency logger.', [
'exception' => $e,
]);
});
}
}
), it is not intended to return a new instance every time, but instead get an existing instance from the "local cache", which is the $channels property. From my tests, the $channels property remains always empty, no matter how many times I request the same log channel.
Steps To Reproduce:
dd(
app('log')->channel('stack')->getLogger(),
app('log')->channel('stack')->getLogger(), // different instance from aboveapp('log')->channel('stack')->getLogger() // yet another instance
);
The text was updated successfully, but these errors were encountered:
Description:
Illuminate\Log\LogManager
returns a new Logger instance every time instead of making one instance and returning the same instance in subsequent calls.According to the source (see
framework/src/Illuminate/Log/LogManager.php
Lines 106 to 125 in 38284c8
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: