Skip to content

Commit 028221e

Browse files
committed
somes fixes
1 parent 450bc79 commit 028221e

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

app/Providers/AppServiceProvider.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Illuminate\Support\Facades\Event;
99
use Illuminate\Support\Facades\URL;
1010
use Illuminate\Support\ServiceProvider;
11+
use LdapRecord\Container;
1112
use Log;
1213

1314
class AppServiceProvider extends ServiceProvider
@@ -36,7 +37,7 @@ public function boot()
3637
URL::forceScheme('https');
3738
}
3839

39-
if (Config::get('app.debug')) {
40+
if (config('app.debug')) {
4041
DB::listen(function ($query) {
4142
Log::info(
4243
$query->sql,
@@ -45,6 +46,13 @@ public function boot()
4546
});
4647
}
4748

49+
// Si le logging LDAP est activé, on force l’utilisation du channel "ldap"
50+
if (config('ldap.logging.enabled')) {
51+
Container::setLogger(
52+
Log::channel('ldap')
53+
);
54+
}
55+
4856
if (in_array('keycloak', Config::get('services.socialite_controller.providers'))) {
4957
Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
5058
$event->extendSocialite('keycloak', \SocialiteProviders\Keycloak\Provider::class);

config/ldap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
'logging' => [
5959
'enabled' => env('LDAP_LOGGING', true),
60-
'channel' => env('LOG_CHANNEL', 'stack'),
60+
'channel' => env('LOG_CHANNEL', 'ldap'),
6161
'level' => env('LOG_LEVEL', 'info'),
6262
],
6363

docker/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ services:
1515
### PLEASE AFTER ONE RUN DISABLE FOR OPTIMIZATION
1616
- INITIAL_DB=FR #EN OR FR
1717
- TZ=Europe/Paris
18+
- APP_ENV=production
19+
- APP_FORCE_HTTPS=false
1820
volumes:
1921
- .env:/var/www/deming/.env
2022
- ./docker/custom/deming.php:/var/www/deming/config/deming.php

0 commit comments

Comments
 (0)