]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/acl/uuid.c
better error logging
[netatalk.git] / libatalk / acl / uuid.c
index f0d55ca1f5aa9989f0e2ec96661e94976d600e76..e8b96504c61a4b5f13388fc4197725cb26b27312 100644 (file)
@@ -24,6 +24,7 @@
 #include <atalk/logger.h>
 #include <atalk/afp.h>
 #include <atalk/uuid.h>
+#include <atalk/util.h>
 
 #include "aclldap.h"
 #include "cache.h"
@@ -129,7 +130,7 @@ int getuuidfromname( const char *name, uuidtype_t type, uuidp_t uuid) {
     } else  {                   /* if not found in cache */
         ret = ldap_getuuidfromname( name, type, &uuid_string);
         if (ret != 0) {
-            LOG(log_error, logtype_afpd, "getuuidfromname: no result from ldap_getuuidfromname");
+            LOG(log_info, logtype_afpd, "getuuidfromname: no result from ldap_getuuidfromname");
             goto cleanup;
         }
         uuid_string2bin( uuid_string, uuid);
@@ -158,7 +159,8 @@ int getnamefromuuid( uuidp_t uuidp, char **name, uuidtype_t *type) {
     if (ret == 0) {     /* found in cache */
 #ifdef DEBUG
         uuid_bin2string( uuidp, &uuid_string);
-        LOG(log_debug9, logtype_afpd, "getnamefromuuid{cache}: UUID: %s -> name: %s, type:%s", uuid_string, *name, uuidtype[*type]);
+        LOG(log_debug9, logtype_afpd, "getnamefromuuid{cache}: UUID: %s -> name: %s, type:%s",
+            uuid_string, *name, uuidtype[*type]);
         free(uuid_string);
         uuid_string = NULL;
 #endif
@@ -166,11 +168,13 @@ int getnamefromuuid( uuidp_t uuidp, char **name, uuidtype_t *type) {
         uuid_bin2string( uuidp, &uuid_string);
         ret = ldap_getnamefromuuid( uuid_string, name, type);
         if (ret != 0) {
-            LOG(log_error, logtype_afpd, "getnamefromuuid: no result from ldap_getnamefromuuid");
+            LOG(log_warning, logtype_afpd, "getnamefromuuid(%s): no result from ldap_getnamefromuuid",
+                uuid_string);
             goto cleanup;
         }
         add_cachebyuuid( uuidp, *name, *type, 0);
-        LOG(log_debug, logtype_afpd, "getnamefromuuid{LDAP}: UUID: %s -> name: %s, type:%s",uuid_string, *name, uuidtype[*type]);
+        LOG(log_debug, logtype_afpd, "getnamefromuuid{LDAP}: UUID: %s -> name: %s, type:%s",
+            uuid_string, *name, uuidtype[*type]);
     }
 
 cleanup: