MAXSCALE_ macros renames to MXS_

Markus boldly introduced mxs as an abbreviation for Maxscale.
MXS_ is less wieldy than MAXSCALE_ for logging macros.
This commit is contained in:
Johan Wikman
2015-11-02 10:05:25 +02:00
parent 5805eace2e
commit 112e21d507
2 changed files with 8 additions and 8 deletions

View File

@ -1609,7 +1609,7 @@ int skygw_log_rotate(logfile_id_t id)
logfile_t *lf = logmanager_get_logfile(lm, id);
CHK_LOGFILE(lf);
MAXSCALE_NOTICE("Log rotation is called for %s.", lf->lf_full_file_name);
MXS_NOTICE("Log rotation is called for %s.", lf->lf_full_file_name);
logfile_rotate(lf);
err = 0;

View File

@ -185,13 +185,13 @@ const char* get_logpath_default(void);
/**
* Helper, not to be called directly.
*/
#define MAXSCALE_MESSAGE_FLUSH(id, format, ...)\
#define MXS_MESSAGE_FLUSH(id, format, ...)\
do { if (LOG_IS_ENABLED(id)) { skygw_log_write_flush(id, format, ##__VA_ARGS__); } } while (false)
/**
* Helper, not to be called directly.
*/
#define MAXSCALE_MESSAGE(id, format, ...)\
#define MXS_MESSAGE(id, format, ...)\
do { if (LOG_IS_ENABLED(id)) { skygw_log_write(id, format, ##__VA_ARGS__); } } while (false)
/**
@ -200,10 +200,10 @@ const char* get_logpath_default(void);
* @param format The printf format of the message.
* @param ... Arguments, depending on the format.
*/
#define MAXSCALE_ERROR(format, ...) MAXSCALE_MESSAGE_FLUSH(LOGFILE_ERROR, format, ##__VA_ARGS__)
#define MAXSCALE_WARNING(format, ...) MAXSCALE_MESSAGE(LOGFILE_ERROR, format, ##__VA_ARGS__)
#define MAXSCALE_NOTICE(format, ...) MAXSCALE_MESSAGE(LOGFILE_MESSAGE, format, ##__VA_ARGS__)
#define MAXSCALE_INFO(format, ...) MAXSCALE_MESSAGE(LOGFILE_TRACE, format, ##__VA_ARGS__)
#define MAXSCALE_DEBUG(format, ...) MAXSCALE_MESSAGE(LOGFILE_DEBUG, format, ##__VA_ARGS__)
#define MXS_ERROR(format, ...) MXS_MESSAGE_FLUSH(LOGFILE_ERROR, format, ##__VA_ARGS__)
#define MXS_WARNING(format, ...) MXS_MESSAGE(LOGFILE_ERROR, format, ##__VA_ARGS__)
#define MXS_NOTICE(format, ...) MXS_MESSAGE(LOGFILE_MESSAGE, format, ##__VA_ARGS__)
#define MXS_INFO(format, ...) MXS_MESSAGE(LOGFILE_TRACE, format, ##__VA_ARGS__)
#define MXS_DEBUG(format, ...) MXS_MESSAGE(LOGFILE_DEBUG, format, ##__VA_ARGS__)
#endif /** LOG_MANAGER_H */