From: Michal Sojka Date: Fri, 18 Feb 2011 23:42:20 +0000 (+0100) Subject: forbrun: Enable uLUt-based logging X-Git-Url: http://rtime.felk.cvut.cz/gitweb/frescor/forb.git/commitdiff_plain/e3c2dddc2aa49602cea2289a0ba973a02923ef7f forbrun: Enable uLUt-based logging 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. --- diff --git a/src/forbrun/forbrun.c b/src/forbrun/forbrun.c index 62e1607..9219cee 100644 --- a/src/forbrun/forbrun.c +++ b/src/forbrun/forbrun.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -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 ] -- .so [ options for forb_main() ] [-- ...]\n"); printf(" -d, --daemon [pid-file] go to background after initialization of servers\n"); - printf(" -i, --id \n"); -/* printf(" -l, --loglevel |=,...\n"); */ + printf(" -i, --id \n"); + printf(" -l, --loglevel |=,...\n"); printf(" -p, --port 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;