Skip to content

Commit 1c3fff0

Browse files
committed
feat: [LaravelLogEnhancementServiceProvider] register logger as a singleton
1 parent 3a4da66 commit 1c3fff0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/LaravelLogEnhancementServiceProvider.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ private function routeConfiguration()
5757
public function register()
5858
{
5959
// Register facade
60-
$this->app->singleton('laravel-log-enhancement', function () {
61-
return new LaravelLogEnhancement;
60+
// $this->app->singleton('laravel-log-enhancement', function () {
61+
// return new LaravelLogEnhancement;
62+
// });
63+
$this->app->singleton(Logger::class, function (Application $app) {
64+
return new Logger($app->make(LoggerInterface::class));
6265
});
6366
}
6467

0 commit comments

Comments
 (0)