]> rtime.felk.cvut.cz Git - frescor/forb.git/commitdiff
forbrun: Enable uLUt-based logging
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Feb 2011 23:42:20 +0000 (00:42 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Feb 2011 23:42:20 +0000 (00:42 +0100)
It had no sense to disable it -- it works fine for FORB logging. If it
is needed to change log levels of server, this could be implemented in
forb_main() of the particular server.

src/forbrun/forbrun.c

index 62e1607608b02a98bc5b2ba7461c6bf1537ef825..9219cee4da3893b60d378b8881fc6ec1c96db62a 100644 (file)
@@ -5,6 +5,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <ul_log.h>
+#include <ul_logreg.h>
 #include <stdbool.h>
 #include <dlfcn.h>
 #include <forb/forb-internal.h>
@@ -13,7 +14,7 @@
 static struct option long_opts[] = {
     { "daemon",   optional_argument, NULL, 'd' },
     { "id",      required_argument, NULL, 'i' },
-/*     { "loglevel", required_argument, NULL, 'l' }, */
+    { "loglevel", required_argument, NULL, 'l' },
     { "port",            required_argument, NULL, 'p' },
     { 0, 0, 0, 0}
 };
@@ -23,8 +24,8 @@ usage(void)
 {
        printf("usage: forbrun [ options ] -- <forb-server>.so [ options for forb_main() ] [-- ...]\n");
        printf("  -d, --daemon [pid-file]   go to background after initialization of servers\n");
-       printf("  -i, --id <orb id>         \n");
-/*     printf("  -l, --loglevel <number>|<domain>=<number>,...\n"); */
+       printf("  -i, --id <textual orb id>\n");
+       printf("  -l, --loglevel <number>|<domain>=<number>,...\n");
        printf("  -p, --port <number>       listen on a fixed port number\n");
 }
 
@@ -73,7 +74,6 @@ int main(int argc, char *argv[])
 
        while ((opt = getopt_long(argc, argv, "d::hil:p:x", &long_opts[0], NULL)) != EOF) {
                switch (opt) {
-#if 0                  
                        case 'l':
                                if (*optarg == '?') {
                                        ul_logreg_for_each_domain(print_log_domain, NULL);
@@ -86,7 +86,6 @@ int main(int argc, char *argv[])
                                                error(1, EINVAL, "Error parsing -l argument at char %d\n", ret);
                                }
                                break;
-#endif
                        case 'd':
                                opt_daemon = true;
                                opt_pidfile = optarg;