
Earlier, the global setting for the syslog decided whether syslog was enabled when skygw_logmanager_init was called, but not whether logging to syslog actually was made. Now syslog logging is enabled by default and the global setting decides whether or not syslog logging actually is made. That is, this opens up the possiblity for making it possible to turn on and off sysloging at runtime. Further, although the API led you to believe otherwise, it was hardwired that LOGFILE_ERROR and LOGFILE_MESSAGE messages were written to syslog. The changed removed the need for passing an argv array explicitly.
21 lines
363 B
C
21 lines
363 B
C
#ifndef TEST_UTILS_H
|
|
#define TEST_UTILS_H
|
|
#include <poll.h>
|
|
#include <dcb.h>
|
|
#include <housekeeper.h>
|
|
#include <maxscale_test.h>
|
|
#include <log_manager.h>
|
|
|
|
void init_test_env(char *path)
|
|
{
|
|
int argc = 3;
|
|
|
|
const char* logdir = path ? path : TEST_LOG_DIR;
|
|
|
|
skygw_logmanager_init(NULL, logdir, LOG_TARGET_DEFAULT);
|
|
poll_init();
|
|
hkinit();
|
|
}
|
|
|
|
#endif
|