Due to an include conflict between /usr/include/poll.h and
maxscale/server/include/poll.h the latter was moved to
maxscale/server/include/maxscale/poll.h.
Once 1.4 is out, all maxscale header files will be moved to that
same sub-directory. That will prevent include conflicts and also
make it easy to see which include files belong to maxscale and
which do not.
There were some variance regarding the way the MaxScale log (i.e.
the file log) was called; "maxlog" in configuration file and
"maxscalelog" at the command line and maxadmin interface. Now it
is uniformly referred to as "maxlog" in the configuration file, at
the command line, from maxadmin and in the code.
It should not be possible to disable the error priority as error
messages should always be logged.
In addition some minor corrections of command line texts.
The earlier log file based approach for enabling and disabling
messages has now been completely replaced with the syslog priority
based approach.
Similarly as with log files before it is now possible to enable
and disable a log priority for a particular session, even though
it apparently has not been used much.
The local test-programs of the logging has got minimal attention
only to make them compile. They should get an overhaul as they did
not work before either.
Added maxadmin command to flush all logs to disk. This will allow tests
to gather all logs without having to wait for the logs to be flushed by
the log flusher thread.
skygw_[enable|disable]_log has now been removed from the external
interface and priorities must instead be set using
mxs_log_set_priority_enabled(int priority, bool enabled). A bitmask
is already being updated, but internally and as used by the LOG_IF
macros, the actual enabling is still made using logfile ids.
The configuration entries have been replaced as follows:
log_messages -> log_notice
log_trace -> log_info
The old ones can be used, but cause a warning to be logged.
Similarily the maxadmin commands have been updated.
"[enable|disable] log ..." works as expected, but there will be
a message about it being deprecated. Instead there is now a
[enable|disable] log-priority err|warning|notice|info|debug
command that should be used instead.
With only one log-file no arguments are needed. The maxadmin command
'flush log' still accepts all the previous arguments, but warns about
them being deprecated.
Maxinfo now supports the shutdown command which shuts down a service, monitor
or MaxScale itself and the restart command which restarts a stopped monitor
or service.
- Tabs replaced with spaces.
- Indentation level 4 spaces.
- Allman braces (except for part of commands)
- Space after ,
- Spaces around binary operators.
No other changes.
debugcmd.c:execute_cmd:added skip counter which adjusts the starting position of next argument correctly thus avoiding cropping the latter quoted argument.
client/test/maxadmin_test.sh: added new cases for testing maxadmin
service.c:dListListeners:fixed NULL-pointer reference
debugcli.h: replaced magic number 80 with constant integer.
cli.c:execute:fixed command buffer overflow
debugcmd.c:convert_arg:restored return value to 0 in case of error
debugcmd.c:convert_arg returned zero if argument is invalid. That zero was cast to pointer. Using it caused NULL-pointer references. Changed the return value indicating about error to 0x1 which is then handled properly.
dcb.c:dcb_hashtable_stats:division by zero
hashtable.c:hashtable_get_stats: NULL-pointer reference
service.c:serviceStartPort:set service->users NULL to avoid referring to freed memory
users.c:dcb_usersPrintf: NULL-pointer reference
debugcmd.c:convert_arg: changed return value to 1 in case of error, 0 (==NULL) is valid but it indicates that there are no users loaded.
execute_cmd: fixed command handling