log_manager.h

Added macros which allow for testing locally if log is enabled or not.

server/Makefile
	Added directory creation command to Makefile. This fixes problem where errmsg.sys was copied to MaxScale/mysql instead of MaxScale/mysql/errmsg.sys

dcb.b
	Added external variable which carries the information of enabled logs from log_manager.cc

gateway.c
	Tuned logging.
This commit is contained in:
vraatikka
2013-12-12 07:05:38 +02:00
parent 06ebc6f4b5
commit 272ca036e4
4 changed files with 30 additions and 3 deletions

View File

@ -35,6 +35,18 @@ typedef enum {
typedef enum { FILEWRITER_INIT, FILEWRITER_RUN, FILEWRITER_DONE }
filewriter_state_t;
#define LE LOGFILE_ERROR
#define LM LOGFILE_MESSAGE
#define LT LOGFILE_TRACE
#define LD LOGFILE_DEBUG
#define LOGIF(id,cmd) if (lm_enabled_logfiles_bitmask & id) \
{ \
cmd; \
} \
#define LOG_IS_ENABLED(id) ((lm_enabled_logfiles_bitmask & id) ? true : false)
/**
* UNINIT means zeroed memory buffer allocated for the struct.
* INIT means that struct members may have values, and memory may