]> arthur.barton.de Git - netatalk.git/blobdiff - bin/misc/uuidtest.c
verbose output was broken
[netatalk.git] / bin / misc / uuidtest.c
index a4c700c5c9814ccdb0740180329854fa9bff72cb..77a7fa793bfb744b276ebb1313f076d454659076 100644 (file)
@@ -68,24 +68,26 @@ int main( int argc, char **argv)
 {
     int ret, i, c;
     int verbose = 0;
+    int logsetup = 0;
     uuid_t uuid;
     uuidtype_t type;
     char *uuidstring = NULL;
     char *name = NULL;
 
-    setuplog("console log_error /dev/tty");
-
     while ((c = getopt(argc, argv, ":vu:g:i:")) != -1) {
         switch(c) {
 
         case 'v':
             if (! verbose) {
                 verbose = 1;
-                setuplog("console log_debug /dev/tty");
+                setuplog("default log_maxdebug /dev/tty");
+                logsetup = 1;
             }
             break;
 
         case 'u':
+            if (! logsetup)
+                setuplog("default log_info /dev/tty");
             parse_ldapconf();
             printf("Searching user: %s\n", optarg);
             ret = getuuidfromname( optarg, UUID_USER, uuid);
@@ -99,6 +101,8 @@ int main( int argc, char **argv)
             break;
 
         case 'g':
+            if (! logsetup)
+                setuplog("default log_info /dev/tty");
             parse_ldapconf();
             printf("Searching group: %s\n", optarg);
             ret = getuuidfromname( optarg, UUID_GROUP, uuid);
@@ -112,6 +116,8 @@ int main( int argc, char **argv)
             break;
 
         case 'i':
+            if (! logsetup)
+                setuplog("default log_info /dev/tty");
             parse_ldapconf();
             printf("Searching uuid: %s\n", optarg);
             uuid_string2bin(optarg, uuid);