Added more logging for LDAP client

This commit is contained in:
Frederic Guillot
2016-03-27 18:30:02 -04:00
parent cefeb7ef96
commit d0a0be89f2
5 changed files with 46 additions and 3 deletions

View File

@@ -3,6 +3,7 @@
namespace Kanboard\Core\Ldap;
use LogicException;
use Psr\Log\LoggerInterface;
/**
* LDAP Client
@@ -20,6 +21,14 @@ class Client
*/
protected $ldap;
/**
* Logger instance
*
* @access private
* @var LoggerInterface
*/
private $logger;
/**
* Establish LDAP connection
*
@@ -165,4 +174,28 @@ class Client
{
return LDAP_PASSWORD;
}
/**
* Set logger
*
* @access public
* @param LoggerInterface $logger
* @return Client
*/
public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
return $this;
}
/**
* Get logger
*
* @access public
* @return LoggerInterface
*/
public function getLogger()
{
return $this->logger;
}
}