diff options
Diffstat (limited to 'read.go')
-rw-r--r-- | read.go | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -80,14 +80,13 @@ func (server *Server) handleSearch(s ldap.UserState, w ldap.ResponseWriter, m *l } func (server *Server) handleSearchInternal(state *State, w ldap.ResponseWriter, r *message.SearchRequest) (int, error) { - if DEBUG { - server.logger.Printf("-- SEARCH REQUEST: --") - server.logger.Printf("Request BaseDn=%s", r.BaseObject()) - server.logger.Printf("Request Filter=%s", r.Filter()) - server.logger.Printf("Request FilterString=%s", r.FilterString()) - server.logger.Printf("Request Attributes=%s", r.Attributes()) - server.logger.Printf("Request TimeLimit=%d", r.TimeLimit().Int()) - } + + server.logger.Tracef("-- SEARCH REQUEST: --") + server.logger.Tracef("Request BaseDn=%s", r.BaseObject()) + server.logger.Tracef("Request Filter=%s", r.Filter()) + server.logger.Tracef("Request FilterString=%s", r.FilterString()) + server.logger.Tracef("Request Attributes=%s", r.Attributes()) + server.logger.Tracef("Request TimeLimit=%d", r.TimeLimit().Int()) if !server.config.Acl.Check(&state.login, "read", string(r.BaseObject()), []string{}) { return ldap.LDAPResultInsufficientAccessRights, fmt.Errorf("Please specify a base object on which you have read rights") @@ -111,10 +110,9 @@ func (server *Server) handleSearchInternal(state *State, w ldap.ResponseWriter, if err != nil { return ldap.LDAPResultOperationsError, err } - if DEBUG { - server.logger.Printf("in %s: %#v", basePath+"/", data) - server.logger.Printf("%#v", entries) - } + + server.logger.Tracef("in %s: %#v", basePath+"/", data) + server.logger.Tracef("%#v", entries) for dn, entry := range entries { // Filter out if we don't match requested filter |