From fa8ab33a8387c240ec62274be95efd6604e208a9 Mon Sep 17 00:00:00 2001 From: Nils Kretschmer Date: Wed, 25 Oct 2023 10:31:07 +0000 Subject: [PATCH 1/3] Made Logging Level configurable. --- config/ldap.php | 1 + src/Events/Loggable.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/ldap.php b/config/ldap.php index 45baf668..d1de9a90 100644 --- a/config/ldap.php +++ b/config/ldap.php @@ -59,6 +59,7 @@ 'logging' => [ 'enabled' => env('LDAP_LOGGING', true), 'channel' => env('LOG_CHANNEL', 'stack'), + 'level' => env('LDAP_LOGGING_LEVEL', 'info'), ], /* diff --git a/src/Events/Loggable.php b/src/Events/Loggable.php index ad609164..cfcfd190 100644 --- a/src/Events/Loggable.php +++ b/src/Events/Loggable.php @@ -11,7 +11,7 @@ trait Loggable */ public function getLogLevel(): string { - return 'info'; + return Config::get('ldap.logging.level', 'info'); } /** From 74a2761a04ce3405eb005385427abdd6feaf31e8 Mon Sep 17 00:00:00 2001 From: Nils Kretschmer Date: Wed, 25 Oct 2023 12:56:00 +0000 Subject: [PATCH 2/3] Added logging level to Test. --- tests/Unit/LdapServiceProviderTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Unit/LdapServiceProviderTest.php b/tests/Unit/LdapServiceProviderTest.php index 5da4da8a..73b8ae62 100644 --- a/tests/Unit/LdapServiceProviderTest.php +++ b/tests/Unit/LdapServiceProviderTest.php @@ -121,6 +121,7 @@ public function test_env_config_is_loaded_and_cacheable() 'logging' => [ 'enabled' => false, 'channel' => 'stack', + 'level' => 'info', ], 'cache' => [ 'enabled' => false, From 9ec6a0fbcc04bb0b27ba610626dd7a665b5ce94a Mon Sep 17 00:00:00 2001 From: Nils Kretschmer Date: Thu, 26 Oct 2023 10:01:07 +0200 Subject: [PATCH 3/3] Update config/ldap.php Co-authored-by: Steve Bauman --- config/ldap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/ldap.php b/config/ldap.php index d1de9a90..0772558d 100644 --- a/config/ldap.php +++ b/config/ldap.php @@ -59,7 +59,7 @@ 'logging' => [ 'enabled' => env('LDAP_LOGGING', true), 'channel' => env('LOG_CHANNEL', 'stack'), - 'level' => env('LDAP_LOGGING_LEVEL', 'info'), + 'level' => env('LOG_LEVEL', 'info'), ], /*