summaryrefslogtreecommitdiff
path: root/app/Core/Ldap/Client.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-03-27 18:30:02 -0400
committerFrederic Guillot <fred@kanboard.net>2016-03-27 18:30:02 -0400
commitd0a0be89f2a774e5438fe844d69541fecb5cafc4 (patch)
tree2f0738c4e49f41f00e74fa80dc69efa2de4d2c26 /app/Core/Ldap/Client.php
parentcefeb7ef96902f4c75936bccc0cd72258ef0d7d6 (diff)
Added more logging for LDAP client
Diffstat (limited to 'app/Core/Ldap/Client.php')
-rw-r--r--app/Core/Ldap/Client.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/app/Core/Ldap/Client.php b/app/Core/Ldap/Client.php
index 05658190..cee67da5 100644
--- a/app/Core/Ldap/Client.php
+++ b/app/Core/Ldap/Client.php
@@ -3,6 +3,7 @@
namespace Kanboard\Core\Ldap;
use LogicException;
+use Psr\Log\LoggerInterface;
/**
* LDAP Client
@@ -21,6 +22,14 @@ class Client
protected $ldap;
/**
+ * Logger instance
+ *
+ * @access private
+ * @var LoggerInterface
+ */
+ private $logger;
+
+ /**
* Establish LDAP connection
*
* @static
@@ -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;
+ }
}