File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Onramplab \LaravelLogEnhancement \Facades ;
4+
5+ use Illuminate \Support \Facades \Facade ;
6+
7+ class LoggerFacade extends Facade
8+ {
9+ /**
10+ * Get the registered name of the component.
11+ *
12+ * @return string
13+ */
14+ protected static function getFacadeAccessor ()
15+ {
16+ return 'laravel-log-enhancement-logger ' ;
17+ }
18+ }
Original file line number Diff line number Diff line change 22
33namespace Onramplab \LaravelLogEnhancement ;
44
5+ use Illuminate \Contracts \Foundation \Application ;
56use Illuminate \Support \ServiceProvider ;
67use Illuminate \Support \Facades \Route ;
8+ use Psr \Log \LoggerInterface ;
79
810class LaravelLogEnhancementServiceProvider extends ServiceProvider
911{
@@ -63,6 +65,10 @@ public function register()
6365 $ this ->app ->singleton (Logger::class, function (Application $ app ) {
6466 return new Logger ($ app ->make (LoggerInterface::class));
6567 });
68+
69+ $ this ->app ->bind ('laravel-log-enhancement-logger ' ,function (){
70+ return app ()->make (Logger::class);
71+ });
6672 }
6773
6874 /**
You can’t perform that action at this time.
0 commit comments