Skip to content

Commit

Permalink
Merge pull request #600 from nilskretschmer/Feature-#599
Browse files Browse the repository at this point in the history
Made Logging Level configurable.
  • Loading branch information
stevebauman authored Oct 26, 2023
2 parents 98bd853 + 9ec6a0f commit bd1cb18
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
'logging' => [
'enabled' => env('LDAP_LOGGING', true),
'channel' => env('LOG_CHANNEL', 'stack'),
'level' => env('LOG_LEVEL', 'info'),
],

/*
Expand Down
2 changes: 1 addition & 1 deletion src/Events/Loggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ trait Loggable
*/
public function getLogLevel(): string
{
return 'info';
return Config::get('ldap.logging.level', 'info');
}

/**
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/LdapServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public function test_env_config_is_loaded_and_cacheable()
'logging' => [
'enabled' => false,
'channel' => 'stack',
'level' => 'info',
],
'cache' => [
'enabled' => false,
Expand Down

0 comments on commit bd1cb18

Please sign in to comment.