Commit Graph

23 Commits

Author SHA1 Message Date
44df53d846 LOGIF and skygw_write_log removed from server/core/*.c
LOGIF and skygw_write_log removed from server/core/*.c and
replaced with calls to MXS_(ERROR|WARNING|NOTICE|INFO|DEBUG).
This is a mechanism change, no updating of the actual message
has been performed.

Currently this causes a very small performance hit, since the
check whether the priority is enabled or not is performed in
the function that is called and not before the function is called.
Once all LOGIFs and skygw_write_logs have been replaced, the
behaviour will be altered back to what it was.
2015-11-16 09:49:12 +02:00
dee20fe077 Merge remote-tracking branch 'origin/develop' into MXS-329-develop-20151111
# Conflicts:
#	server/core/CMakeLists.txt
#	server/core/buffer.c
#	server/core/service.c
#	server/modules/filter/tee.c
#	server/modules/monitor/mysql_mon.c
#	server/modules/routing/binlog/blr.c
#	server/modules/routing/binlog/blr_slave.c
#	server/modules/routing/debugcmd.c
#	server/modules/routing/readwritesplit/readwritesplit.c
#	utils/skygw_utils.cc

- resolved.
2015-11-11 11:08:02 +00:00
834a88aeda Log variables moved to log_manager.h
The log manager variables lm_enabled_log_files_bitmask, log_ses_count
and tls_log_info that earlier were declared separately in every
c-file are now declared in the log_manager.h header.
2015-11-04 14:26:53 +02:00
cfeaf7d6e9 Merge remote-tracking branch 'origin/develop' into MXS-329
Conflicts:
	server/core/session.c
2015-09-10 13:07:27 +01:00
160bbb70ee MXS-251: strerror
Replaces all calls to strerror with calls to strerror_r. The former
is non-thread safe while the latter is.
2015-09-05 15:52:13 +03:00
820bb4ea00 Avoid name clash - change random to random_jkiss 2015-08-26 16:18:08 +01:00
1f6b544f33 Tidy dcb_free (prefer use of dcb_close) and remove from test code; add good random number generator. 2015-08-26 15:43:21 +01:00
4701604965 Added service user to mysql_users
Added service user to mysql_users

    [MaxInfo]
    type=service
    router=maxinfo
    user=monitor
    passwd=EBD2F49C3B375812A8CDEBA632ED8BBC
2015-02-27 12:20:00 +01:00
fd11e6a7f5 Session-specific logging. Added functions
void session_enable_log(SESSION* ses, logfile_id_t id)
and
void session_disable_log(SESSION* ses, logfile_id_t id)

Which switch specific log type on/off if the log type in question is not generally enabled.

Each thread carries a thread-specific struct log_info_t which includes members for current session id and bitfield for enabled log types for the current session. That information is checked before actual log write functions are called.

Each file where session-specific logging is used, must include the following exports:

/** Defined in log_manager.cc */
extern int            lm_enabled_logfiles_bitmask;
extern size_t         log_ses_count[];
extern __thread log_info_t tls_log_info;
2014-11-19 00:08:59 +02:00
fc5c3943e8 Fixes to Coverity defects:
72643
72645
72655
72656
72657
72658
72664
72698
72712
2014-11-12 19:02:37 +02:00
32d66e6f84 Minor modifications for testing. 2014-10-03 17:24:46 +01:00
c4ca1ddb13 Updated non-source files with new company name. 2014-10-01 15:21:47 +03:00
b0683d9b4d Updated the licensing year from 2013 to 2013-2014 2014-10-01 14:37:12 +03:00
f4e591e382 Changed 'SkySQL Gateway' to 'MariaDB Corporation MaxScale' 2014-09-30 13:15:03 +03:00
c344231f80 Renamed all occurences of SkySQL to MariaDB Corporation 2014-09-30 13:02:10 +03:00
d6a2ef6996 Misc fixes to doxygen comments 2014-08-19 13:22:40 +01:00
97bc1ed042 Fixed comments to be compatible with doxygen 2013-12-13 19:11:10 +02:00
d403018fd9 Surrounded every log writing command with LOGIF macro, which tests if the given logfile id matches with those enabled. The comparison is done against local variable and expensive function call is avoided. 2013-12-12 16:14:33 +02:00
701830f0ab Logging related (mostly) sanity checks and fixes.
- Checked argument types and counts
- Removed trailing line feeds
- Removed thread ids from error logs (they are used in trace / debug log
- Added some state information to dcbs
- Added prefix 'Error' or 'Fatal' to error logs.
- Switches all error logs to use flushing log write.
2013-09-30 11:14:36 +03:00
8bf73ea154 Replaced write system function with wrapper gw_write. It allows for generating failures by using telnet commands, fail backendfd, fail clientfd, which are available in debug build only. 2013-09-17 00:07:56 +03:00
8f98ae4751 Removed old mysql protocol files 2013-09-04 15:53:51 +02:00
cae4d38a7e Removed unnecessary argument from log manager commands because it is not used and it is always NULL. 2013-08-04 23:30:47 +03:00
a7c82310f9 moving files to /server to make merge possible 2013-07-28 05:31:11 +00:00