Add definitions of MXS_MODULE_NAME to all modules

All modules now declare a name for the module. This is name is added as a
prefix to all messages logged by a module. The prefix should help
determine which part of the system logs a message.
This commit is contained in:
Markus Mäkelä 2017-01-16 11:16:05 +02:00
parent d054bc9b04
commit 2cabcea211
66 changed files with 154 additions and 32 deletions

View File

@ -25,6 +25,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "CDCPlainAuth"
#include <maxscale/gw_authenticator.h>
#include <sys/stat.h>
#include <cdc.h>

View File

@ -11,6 +11,8 @@
* Public License.
*/
#define MXS_MODULE_NAME "GSSAPIAuth"
#include <maxscale/gw_authenticator.h>
#include <maxscale/alloc.h>
#include <maxscale/dcb.h>

View File

@ -11,6 +11,8 @@
* Public License.
*/
#define MXS_MODULE_NAME "GSSAPIBackendAuth"
#include <maxscale/gw_authenticator.h>
#include <maxscale/alloc.h>
#include <maxscale/dcb.h>

View File

@ -24,6 +24,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "HTTPAuth"
#include <maxscale/gw_authenticator.h>
#include <maxscale/alloc.h>
#include <maxscale/modinfo.h>

View File

@ -26,6 +26,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "MaxAdminAuth"
#include <maxscale/gw_authenticator.h>
#include <maxscale/alloc.h>
#include <maxscale/modinfo.h>

View File

@ -35,6 +35,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "MySQLAuth"
#include <stdio.h>
#include <ctype.h>
#include <mysql.h>

View File

@ -25,6 +25,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "MySQLAuth"
#include <mysql_auth.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/gw_authenticator.h>

View File

@ -29,6 +29,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "MySQLBackendAuth"
#include <maxscale/gw_authenticator.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/alloc.h>

View File

@ -27,6 +27,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "NullAuthAllow"
#include <maxscale/gw_authenticator.h>
#include <maxscale/modinfo.h>
#include <maxscale/dcb.h>

View File

@ -27,6 +27,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "NullAuthDeny"
#include <maxscale/gw_authenticator.h>
#include <maxscale/modinfo.h>
#include <maxscale/dcb.h>

View File

@ -10,6 +10,9 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#define MXS_MODULE_NAME "ccrfilter"
#include <stdio.h>
#include <maxscale/filter.h>
#include <maxscale/modinfo.h>

View File

@ -10,6 +10,9 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#define MXS_MODULE_NAME "hintfilter"
#include <stdio.h>
#include <maxscale/filter.h>
#include <maxscale/alloc.h>

View File

@ -10,6 +10,9 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#define MXS_MODULE_NAME "hintfilter"
#include <stdio.h>
#include <ctype.h>
#include <string.h>

View File

@ -11,6 +11,8 @@
* Public License.
*/
#define MXS_MODULE_NAME "insertstream"
#include <maxscale/cdefs.h>
#include <strings.h>

View File

@ -36,6 +36,8 @@
* or diagnostic being made for the session script.
*/
#define MXS_MODULE_NAME "luafilter"
#include <maxscale/cdefs.h>
#include <lauxlib.h>
#include <lua.h>

View File

@ -56,6 +56,9 @@
*@endverbatim
* See the individual struct documentations for logging trigger parameters
*/
#define MXS_MODULE_NAME "mqfilter"
#include <my_config.h>
#include <stdio.h>
#include <fcntl.h>

View File

@ -11,6 +11,8 @@
* Public License.
*/
#define MXS_MODULE_NAME "namedserverfilter"
#include <stdio.h>
#include <maxscale/alloc.h>
#include <maxscale/filter.h>

View File

@ -34,6 +34,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "qlafilter"
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>

View File

@ -11,6 +11,8 @@
* Public License.
*/
#define MXS_MODULE_NAME "regexfilter"
#include <maxscale/cdefs.h>
#include <string.h>
#include <stdio.h>

View File

@ -41,6 +41,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "tee"
#include <stdio.h>
#include <fcntl.h>
#include <maxscale/filter.h>

View File

@ -32,6 +32,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "topfilter"
#include <stdio.h>
#include <fcntl.h>
#include <maxscale/filter.h>

View File

@ -40,6 +40,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "tpmfilter"
#include <maxscale/cdefs.h>
#include <ctype.h>

View File

@ -15,6 +15,8 @@
* @file auroramon.c - Amazon RDS Aurora monitor
*/
#define MXS_MODULE_NAME "auroramon"
#include <maxscale/modinfo.h>
#include <maxscale/thread.h>
#include <maxscale/monitor.h>

View File

@ -33,6 +33,7 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "galeramon"
#include "galeramon.h"
#include <maxscale/dcb.h>

View File

@ -25,6 +25,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "mmmon"
#include "mmmon.h"
#include <maxscale/dcb.h>
#include <maxscale/alloc.h>

View File

@ -45,6 +45,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "mysqlmon"
#include "../mysqlmon.h"
#include <maxscale/dcb.h>
#include <maxscale/modutil.h>

View File

@ -25,6 +25,7 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "ndbclustermon"
#include "../mysqlmon.h"
#include <maxscale/alloc.h>

View File

@ -30,6 +30,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "CDC"
#include <cdc.h>
#include <maxscale/alloc.h>
#include <maxscale/modinfo.h>

View File

@ -32,6 +32,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "HTTPD"
#include "httpd.h"
#include <ctype.h>
#include <maxscale/alloc.h>

View File

@ -11,6 +11,8 @@
* Public License.
*/
#define MXS_MODULE_NAME "MySQLBackend"
#include <maxscale/protocol/mysql.h>
#include <maxscale/log_manager.h>
#include <maxscale/modutil.h>

View File

@ -45,6 +45,9 @@
* 07/02/2016 Martin Brampton Split off authentication and SSL.
* 31/05/2016 Martin Brampton Implement connection throttling
*/
#define MXS_MODULE_NAME "MySQLClient"
#include <maxscale/protocol.h>
#include <maxscale/alloc.h>
#include <maxscale/log_manager.h>

View File

@ -10,6 +10,9 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#define MXS_MODULE_NAME "maxscaled"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

View File

@ -10,6 +10,9 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#define MXS_MODULE_NAME "telnetd"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

View File

@ -24,8 +24,7 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "avrorouter"
#include <maxscale/cdefs.h>
#include "avrorouter.h"
#include <stdio.h>
#include <stdlib.h>
@ -48,7 +47,6 @@
#include <ini.h>
#include <sys/stat.h>
#include "avrorouter.h"
#include <maxscale/random_jkiss.h>
#include <binlog_common.h>
#include <avro/errors.h>

View File

@ -24,6 +24,8 @@
* @endverbatim
*/
#include "avrorouter.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
@ -37,7 +39,6 @@
#include <maxscale/spinlock.h>
#include <maxscale/log_manager.h>
#include <maxscale/version.h>
#include "avrorouter.h"
#include <maxavro.h>
#include <maxscale/alloc.h>

View File

@ -30,10 +30,11 @@
* @endverbatim
*/
#include "avrorouter.h"
#include <binlog_common.h>
#include <blr_constants.h>
#include <sys/stat.h>
#include "avrorouter.h"
#include <maxscale/log_manager.h>
#include <maxscale/pcre2.h>
#include <ini.h>

View File

@ -33,6 +33,7 @@
*/
#include "avrorouter.h"
#include <maxscale/debug.h>
#include <glob.h>

View File

@ -11,11 +11,11 @@
* Public License.
*/
#include "avrorouter.h"
#include <maxscale/mysql_utils.h>
#include <jansson.h>
#include <maxscale/alloc.h>
#include "avrorouter.h"
#include <strings.h>
#define WRITE_EVENT 0

View File

@ -14,11 +14,9 @@
/**
* @file avro_schema.c - Avro schema related functions
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include "avrorouter.h"
#include <maxscale/mysql_utils.h>
#include <jansson.h>
#include <stdio.h>

View File

@ -18,6 +18,9 @@
* MaxScale AVRO router
*
*/
#define MXS_MODULE_NAME "avrorouter"
#include <maxscale/cdefs.h>
#include <stdbool.h>
#include <stdint.h>

View File

@ -59,6 +59,9 @@
*
* @endverbatim
*/
#include "blr.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -71,7 +74,6 @@
#include <maxscale/utils.h>
#include <maxscale/secrets.h>
#include <maxscale/spinlock.h>
#include "blr.h"
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>
#include <maxscale/housekeeper.h>

View File

@ -43,6 +43,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "binlogrouter"
#include <maxscale/cdefs.h>
#include <maxscale/dcb.h>
#include <maxscale/buffer.h>

View File

@ -31,6 +31,9 @@
*
* @endverbatim
*/
#include "blr.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -39,7 +42,6 @@
#include <maxscale/router.h>
#include <maxscale/atomic.h>
#include <maxscale/spinlock.h>
#include "blr.h"
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>

View File

@ -48,6 +48,9 @@
*
* @endverbatim
*/
#include "blr.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
@ -62,7 +65,6 @@
#include <maxscale/router.h>
#include <maxscale/atomic.h>
#include <maxscale/spinlock.h>
#include "blr.h"
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>
#include <maxscale/gwdirs.h>

View File

@ -55,6 +55,9 @@
*
* @endverbatim
*/
#include "blr.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -63,7 +66,6 @@
#include <maxscale/router.h>
#include <maxscale/atomic.h>
#include <maxscale/session.h>
#include "blr.h"
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>
#include <maxscale/housekeeper.h>

View File

@ -68,6 +68,8 @@
* @endverbatim
*/
#include "blr.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
@ -78,7 +80,6 @@
#include <maxscale/router.h>
#include <maxscale/atomic.h>
#include <maxscale/spinlock.h>
#include "blr.h"
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>
#include <maxscale/housekeeper.h>

View File

@ -40,6 +40,8 @@
* @endverbatim
*/
#include "blr.h"
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
@ -48,7 +50,6 @@
#include <maxscale/alloc.h>
#include <maxscale/log_manager.h>
#include "blr.h"
static void printVersion(const char *progname);

View File

@ -21,6 +21,9 @@
*
* @endverbatim
*/
#include "../blr.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -30,7 +33,6 @@
#include <maxscale/router.h>
#include <maxscale/atomic.h>
#include <maxscale/spinlock.h>
#include "../blr.h"
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>
#include <maxscale/housekeeper.h>

View File

@ -24,6 +24,9 @@
*
* @endverbatim
*/
#define MXS_MODULE_NAME "cli"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -23,6 +23,9 @@
*
* @endverbatim
*/
#define MXS_MODULE_NAME "debugcli"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -25,6 +25,9 @@
*
* @endverbatim
*/
#include "maxinfo.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -43,7 +46,6 @@
#include <maxscale/dcb.h>
#include <maxscale/maxscale.h>
#include <maxscale/poll.h>
#include "maxinfo.h"
#include <maxscale/log_manager.h>
#include <maxscale/resultset.h>
#include <maxscale/version.h>

View File

@ -26,6 +26,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "maxinfo"
#include <maxscale/cdefs.h>
#include <maxscale/service.h>
#include <maxscale/session.h>

View File

@ -22,6 +22,9 @@
*
* @endverbatim
*/
#include "maxinfo.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -36,7 +39,6 @@
#include <maxscale/spinlock.h>
#include <maxscale/dcb.h>
#include <maxscale/poll.h>
#include "maxinfo.h"
#include <maxscale/log_manager.h>

View File

@ -23,6 +23,9 @@
*
* @endverbatim
*/
#include "maxinfo.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -40,7 +43,6 @@
#include <maxscale/dcb.h>
#include <maxscale/maxscale.h>
#include <maxscale/poll.h>
#include "maxinfo.h"
#include <maxscale/log_manager.h>
#include <maxscale/resultset.h>
#include <maxscale/config.h>

View File

@ -24,6 +24,8 @@
* @endverbatim
*/
#include "maxinfo.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@ -39,7 +41,6 @@
#include <maxscale/spinlock.h>
#include <maxscale/dcb.h>
#include <maxscale/poll.h>
#include "maxinfo.h"
#include <maxscale/log_manager.h>
static MAXINFO_TREE *make_tree_node(MAXINFO_OPERATOR, char *, MAXINFO_TREE *, MAXINFO_TREE *);

View File

@ -27,8 +27,11 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "readconnroute"
#include <maxscale/cdefs.h>
#include <maxscale/dcb.h>
#include <maxscale/service.h>
MXS_BEGIN_DECLS

View File

@ -69,25 +69,23 @@
*
* @endverbatim
*/
#include "readconnection.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <maxscale/alloc.h>
#include <maxscale/service.h>
#include <maxscale/server.h>
#include <maxscale/router.h>
#include <maxscale/atomic.h>
#include <maxscale/spinlock.h>
#include "readconnection.h"
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>
#include <maxscale/modinfo.h>
#include <maxscale/log_manager.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/modutil.h>
/* The router entry points */

View File

@ -10,6 +10,9 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#include "readwritesplit.h"
#include <stdio.h>
#include <strings.h>
#include <string.h>
@ -17,7 +20,6 @@
#include <stdint.h>
#include <maxscale/router.h>
#include "readwritesplit.h"
#include "rwsplit_internal.h"
#include <maxscale/log_manager.h>

View File

@ -25,9 +25,12 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "readwritesplit"
#include <maxscale/cdefs.h>
#include <maxscale/dcb.h>
#include <maxscale/hashtable.h>
#include <maxscale/service.h>
#include <math.h>
MXS_BEGIN_DECLS

View File

@ -10,6 +10,9 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#include "readwritesplit.h"
#include <my_config.h>
#include <stdio.h>
#include <strings.h>
@ -18,7 +21,6 @@
#include <stdint.h>
#include <maxscale/router.h>
#include "readwritesplit.h"
#include "rwsplit_internal.h"
#include <mysql.h>

View File

@ -10,6 +10,9 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#include "readwritesplit.h"
#include <stdio.h>
#include <strings.h>
#include <string.h>
@ -18,7 +21,6 @@
#include <maxscale/alloc.h>
#include <maxscale/router.h>
#include "readwritesplit.h"
#include "rwsplit_internal.h"
/**
* @file rwsplit_route_stmt.c The functions that support the routing of

View File

@ -10,6 +10,9 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#include "readwritesplit.h"
#include <stdio.h>
#include <strings.h>
#include <string.h>
@ -17,7 +20,6 @@
#include <stdint.h>
#include <maxscale/router.h>
#include "readwritesplit.h"
#include "rwsplit_internal.h"
/**
* @file rwsplit_select_backends.c The functions that implement back end

View File

@ -10,6 +10,9 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#include "readwritesplit.h"
#include <stdio.h>
#include <strings.h>
#include <string.h>
@ -17,7 +20,6 @@
#include <stdint.h>
#include <maxscale/router.h>
#include "readwritesplit.h"
#include "rwsplit_internal.h"
/**

View File

@ -10,6 +10,9 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#include "readwritesplit.h"
#include <stdio.h>
#include <strings.h>
#include <string.h>
@ -21,7 +24,6 @@
#include <maxscale/modutil.h>
#include <maxscale/router.h>
#include "readwritesplit.h"
#include "rwsplit_internal.h"
/**
* @file rwsplit_tmp_table.c The functions that carry out checks on

View File

@ -10,6 +10,9 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#include "schemarouter.h"
#include <my_config.h>
#include <stdio.h>
#include <strings.h>
@ -17,7 +20,6 @@
#include <stdlib.h>
#include <stdint.h>
#include <maxscale/router.h>
#include "schemarouter.h"
#include "sharding_common.h"
#include <maxscale/secrets.h>
#include <mysql.h>

View File

@ -25,6 +25,8 @@
* @endverbatim
*/
#define MXS_MODULE_NAME "schemarouter"
#include <maxscale/cdefs.h>
#include <maxscale/dcb.h>
#include <maxscale/hashtable.h>