File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,10 @@ private static function buildLogMessageFromData(array $data): string
181181
182182 protected function registerBrowserLogger (): void
183183 {
184+ if (config ('logging.channels.browser ' ) !== null ) {
185+ return ;
186+ }
187+
184188 config ([
185189 'logging.channels.browser ' => [
186190 'driver ' => 'single ' ,
Original file line number Diff line number Diff line change 3535 expect (app ()->bound (Laravel \Roster \Roster::class))->toBeTrue ()
3636 ->and (config ('logging.channels.browser ' ))->not ->toBeNull ();
3737 });
38+
39+ it ('does not override an existing browser log channel ' , function (): void {
40+ Config::set ('boost.enabled ' , true );
41+ Config::set ('logging.channels.browser ' , [
42+ 'driver ' => 'daily ' ,
43+ 'path ' => storage_path ('logs/custom-browser.log ' ),
44+ ]);
45+ app ()->detectEnvironment (fn (): string => 'local ' );
46+
47+ $ provider = new BoostServiceProvider (app ());
48+ $ provider ->register ();
49+ $ provider ->boot (app ('router ' ));
50+
51+ expect (config ('logging.channels.browser.driver ' ))->toBe ('daily ' )
52+ ->and (config ('logging.channels.browser.path ' ))->toBe (storage_path ('logs/custom-browser.log ' ));
53+ });
3854});
3955
4056describe ('environment restrictions ' , function (): void {
You can’t perform that action at this time.
0 commit comments