Skip to content

Commit 65d7f94

Browse files
committed
set default log channel
1 parent 1ab70d3 commit 65d7f94

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/FirebaseProjectManager.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,15 @@ protected function configure(string $name): FirebaseProject
8383
if ($defaultStorageBucket = $config['storage']['default_bucket'] ?? null) {
8484
$factory = $factory->withDefaultStorageBucket($defaultStorageBucket);
8585
}
86+
if ($logChannel = $config['logging']['http_debug_log_channel'] ?? null) {
87+
$factory = $factory->withHttpDebugLogger(
88+
$this->app->make('log')->channel($logChannel)
89+
);
90+
}
8691

8792
if ($config['debug'] ?? false) {
88-
$factory = $factory->withEnabledDebug();
93+
$logger = $this->app->make('log')->channel($logChannel ?? null);
94+
$factory = $factory->withEnabledDebug($logger);
8995
}
9096

9197
if ($cacheStore = $config['cache_store'] ?? null) {
@@ -100,11 +106,7 @@ protected function configure(string $name): FirebaseProject
100106
);
101107
}
102108

103-
if ($logChannel = $config['logging']['http_debug_log_channel'] ?? null) {
104-
$factory = $factory->withHttpDebugLogger(
105-
$this->app->make('log')->channel($logChannel)
106-
);
107-
}
109+
108110

109111
$options = HttpClientOptions::default();
110112

0 commit comments

Comments
 (0)