*
*
*/
+#include <getopt.h>
#include <forb.h>
#include <forb/config.h>
#include <fcb.h>
#include <ul_gavlcust.h>
#include <string.h>
#include <ul_log.h>
+#include <ul_logreg.h>
#include <forb/server_id.h>
#include <fres_contract.h>
#include "fcb_config.h"
{
}
+static struct option long_opts[] = {
+ { "loglevel", 1, 0, 'l' },
+ { 0, 0, 0, 0}
+};
+
+static void
+usage(void)
+{
+ printf("usage: fcb [ options ]\n");
+ printf(" -l, --loglevel <number>|<domain>=<number>,...\n");
+}
+
int main(int argc, char *argv[])
{
forb_orb orb;
.peer_discovery_callback = peer_discovery_callback,
.peer_dead_callback = peer_dead_callback,
};
-
+ int opt;
+
+ ul_logreg_domain(&ulogd_fcb);
+
+ while ((opt = getopt_long(argc, argv, "l:", &long_opts[0], NULL)) != EOF) {
+ switch (opt) {
+ case 'l':
+ ul_log_domain_arg2levels(optarg);
+ break;
+ case 'h':
+ default:
+ usage();
+ exit(opt == 'h' ? 0 : 1);
+ }
+ }
fosa_clock_get_time(CLOCK_REALTIME, &start_time);