From e39c47e6b493c8cc313ef7ec51eb2b9acb35c30b Mon Sep 17 00:00:00 2001 From: Travis Glenn Hansen <travisghansen@yahoo.com> Date: Sun, 20 May 2012 01:59:04 -0600 Subject: [PATCH] small tweaks to logging --- Makefile | 3 ++- fanout.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c7a3211..74a1c6f 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +PROJ = fanout OBJS = CC = gcc DEBUG = -g @@ -7,7 +8,7 @@ LFLAGS = -Wall $(DEBUG) .PHONY : $(OBJS) fanout : - $(CC) $(LFLAGS) $(OBJS) -o fanout fanout.c + $(CC) $(LFLAGS) $(OBJS) -o $(PROJ) fanout.c clean: \rm fanout diff --git a/fanout.c b/fanout.c index 5a7cc1c..a49974e 100644 --- a/fanout.c +++ b/fanout.c @@ -20,6 +20,7 @@ #include <errno.h> #include <sys/epoll.h> + struct client { int fd; @@ -599,7 +600,7 @@ struct channel *get_channel (const char *channel_name) channel_i = channel_i->next; } - fanout_debug (2, "creating new channel\n"); + fanout_debug (2, "creating new channel %s\n", channel_name); if ((channel_i = calloc (1, sizeof (struct channel))) == NULL) { fanout_error ("memory error"); } @@ -615,7 +616,7 @@ struct channel *get_channel (const char *channel_name) void remove_channel (struct channel *c) { - fanout_debug (3, "removing unused channel %s\n", c->name); + fanout_debug (2, "removing unused channel %s\n", c->name); if (c->next != NULL) { c->next->previous = c->previous; } -- GitLab