MXB_MODULE_NAME must be defined before maxbase/log.h is included

Otherwise MXB_MODULE_NAME will be NULL.
This commit is contained in:
Johan Wikman
2019-01-31 15:23:32 +02:00
parent b18467e17e
commit 4ee0e9364e

View File

@ -20,11 +20,6 @@
#include <syslog.h>
#include <unistd.h>
#include <maxbase/log.h>
#include <maxbase/string.hh>
MXS_BEGIN_DECLS
#if !defined (MXS_MODULE_NAME)
#define MXS_MODULE_NAME NULL
#endif
@ -33,6 +28,11 @@ MXS_BEGIN_DECLS
#define MXB_MODULE_NAME MXS_MODULE_NAME
#endif
#include <maxbase/log.h>
#include <maxbase/string.hh>
MXS_BEGIN_DECLS
typedef mxb_log_target_t mxs_log_target_t;
#define MXS_LOG_TARGET_DEFAULT MXB_LOG_TARGET_DEFAULT
#define MXS_LOG_TARGET_FS MXB_LOG_TARGET_FS