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

@ -68,6 +68,8 @@
#include <skygw_utils.h>
#include <log_manager.h>
extern int lm_enabled_logfiles_bitmask;
static DCB *allDCBs = NULL; /* Diagnotics need a list of DCBs */
static DCB *zombies = NULL;
static SPINLOCK dcbspin = SPINLOCK_INIT;
@ -678,6 +680,17 @@ dcb_write(DCB *dcb, GWBUF *queue)
*/
dcb->writeq = gwbuf_append(dcb->writeq, queue);
dcb->stats.n_buffered++;
#if 1
LOGIF(LD, (skygw_log_write(
LOGFILE_DEBUG,
"%lu [dcb_write] Append to writequeue. %d writes "
"buffered for dcb %p in state %s fd %d",
pthread_self(),
dcb->stats.n_buffered,
dcb,
STRDCBSTATE(dcb->state),
dcb->fd)));
#else
skygw_log_write(
LOGFILE_DEBUG,
"%lu [dcb_write] Append to writequeue. %d writes "
@ -687,6 +700,7 @@ dcb_write(DCB *dcb, GWBUF *queue)
dcb,
STRDCBSTATE(dcb->state),
dcb->fd);
#endif
}
else
{