From f79f41fb62773ecf57faad3d1fac65b51f682477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Thu, 13 Jun 2013 17:27:20 +0200 Subject: [PATCH] .gitignore tags file, --- .gitignore | 2 +- test/udp_heartbeat.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c41d6f2..fe17ed5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ build/ .sconsign.dblite *.swp -/tags +tags doc/ log_subdir/ diff --git a/test/udp_heartbeat.c b/test/udp_heartbeat.c index 18fa205..5fc0ae3 100644 --- a/test/udp_heartbeat.c +++ b/test/udp_heartbeat.c @@ -256,18 +256,20 @@ int main(int argc, char *argv[]) uint16_t local_port = 23456; uint16_t remote_port = 23456; int c; + struct uc_log_destination *dest; srand(getpid()); uc_log_init(&log_modules); - uc_log_add_destination(uc_log_new_stderr(UC_LL_DEBUG, 1)); + dest = uc_log_new_stderr(UC_LL_DEBUG, 1); + uc_log_add_destination(dest); mux = iomux_create(IOMUX_TYPE_DEFAULT); ctx.mux = mux; init_hb_context(&ctx, local_port); - while ((c = getopt(argc, argv, "p:P:a:")) != -1) { + while ((c = getopt(argc, argv, "m:p:P:a:")) != -1) { switch (c) { case 'p': local_port = atoi(optarg); @@ -278,6 +280,9 @@ int main(int argc, char *argv[]) case 'a': peer_add(&ctx, optarg, remote_port); break; + case 'm': + uc_log_destination_set_mask(dest, optarg); + break; default: printf("Unknown option -%c\n", c); return 1;