Modified Makefiles so that liblog_manager.so can be linked in in compilation of core/gateway.c modules/protocol/mysql_backend.c and in modules/routing readconnroute.c.

Modified source files by adding a few logging commands (skygw_log_write) to them, and by adding includes of necessary header files.
This commit is contained in:
vraatikka
2013-06-27 23:14:33 +03:00
parent 7bf99e48e7
commit 3af4089c87
6 changed files with 82 additions and 21 deletions

View File

@ -17,10 +17,17 @@
# Revision History
# Date Who Description
# 13/06/13 Mark Riddoch Initial routing module development
# 27/06/13 Vilho Raatikka Added logmanager-related libs and
# headers so that liblog_manager.so can
# be linked in.
include ../../../build_gateway.inc
LOGPATH := $(ROOT_PATH)/log_manager
UTILSPATH := $(ROOT_PATH)/utils
CC=cc
CFLAGS=-c -fPIC -I/usr/include -I../include -I../../include -Wall -g
LDFLAGS=-shared
CFLAGS=-c -fPIC -I/usr/include -I../include -I../../include -I$(LOGPATH) \
-I$(UTILSPATH) -Wall -g
LDFLAGS=-shared -L$(LOGPATH) -Wl,-rpath,$(LOGPATH) -Wl,-rpath,$(UTILSPATH)
TESTSRCS=testroute.c
TESTOBJ=$(TESTSRCS:.c=.o)
READCONSRCS=readconnroute.c
@ -29,7 +36,7 @@ DEBUGCLISRCS=debugcli.c debugcmd.c
DEBUGCLIOBJ=$(DEBUGCLISRCS:.c=.o)
SRCS=$(TESTSRCS) $(READCONSRCS) $(DEBUGCLISRCS)
OBJ=$(SRCS:.c=.o)
LIBS=-lssl
LIBS=$(UTILSPATH)/skygw_utils.o -lssl -llog_manager
MODULES=libtestroute.so libreadconnroute.so libdebugcli.so
all: $(MODULES)

View File

@ -48,6 +48,8 @@
* startup if the number of current
* connections is the same for two servers
* Addition of master and slave options
* 27/06/13 Vilho Raatikka Added skygw_log_write command as an example
* and necessary headers.
*
* @endverbatim
*/
@ -63,6 +65,10 @@
#include <dcb.h>
#include <spinlock.h>
#include <skygw_types.h>
#include <skygw_utils.h>
#include <log_manager.h>
static char *version_str = "V1.0.1";
/* The router entry points */
@ -96,6 +102,7 @@ version()
void
ModuleInit()
{
skygw_log_write(NULL, LOGFILE_MESSAGE, "Initial test router module.\n");
fprintf(stderr, "Initial test router module.\n");
spinlock_init(&instlock);
instances = NULL;