aboutsummaryrefslogtreecommitdiff
path: root/ldapserver
diff options
context:
space:
mode:
Diffstat (limited to 'ldapserver')
-rw-r--r--ldapserver/client.go10
-rw-r--r--ldapserver/logger.go1
2 files changed, 7 insertions, 4 deletions
diff --git a/ldapserver/client.go b/ldapserver/client.go
index 085041f..681aa76 100644
--- a/ldapserver/client.go
+++ b/ldapserver/client.go
@@ -134,8 +134,9 @@ func (c *client) serve() {
Logger.Printf("Error reading Message : %s\n\t%x", err.Error(), messagePacket.bytes)
continue
}
- if DEBUG {
- Logger.Printf("<<< %d - %s - hex=%x", c.Numero, message.ProtocolOpName(), messagePacket)
+ if TRACE {
+ //Logger.Printf("<<< %d - %s - hex=%x", c.Numero, message.ProtocolOpName(), messagePacket)
+ Logger.Printf("<<< %d - %#v", c.Numero, message)
}
// TODO: Use a implementation to limit runnuning request by client
@@ -211,8 +212,9 @@ func (c *client) close() {
func (c *client) writeMessage(m *ldap.LDAPMessage) {
data, _ := m.Write()
- if DEBUG {
- Logger.Printf(">>> %d - %s - hex=%x", c.Numero, m.ProtocolOpName(), data.Bytes())
+ if TRACE {
+ //Logger.Printf(">>> %d - %s - hex=%x", c.Numero, m.ProtocolOpName(), data.Bytes())
+ Logger.Printf(">>> %d - %#v", c.Numero, m)
}
c.bw.Write(data.Bytes())
c.bw.Flush()
diff --git a/ldapserver/logger.go b/ldapserver/logger.go
index 70352e3..9f145cf 100644
--- a/ldapserver/logger.go
+++ b/ldapserver/logger.go
@@ -9,6 +9,7 @@ import (
var Logger logger
const DEBUG = false
+const TRACE = false
// Logger represents log.Logger functions from the standard library
type logger interface {