When a filter module is not found or the instance creation fails, this is considered
a fatal error and MaxScale will not start. If a failure occurs when the configuration
is being reloaded, the service will not use filters and an error will be logged.
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.
The error message did not provide any useful information and was most of the
time a false positive due to EPOLL_RDHUP events calling the hangup function
of the DCB.
The bundled PCRE2 library will be built as a separate target and configuring
CMake no longer builds it. Instead, it will only be built when it is out of date.
This requires all targets to declare that they depend on the pcre2 target in
order for it to be built.
Previously filter instances were created when the first session was made. This
caused filter configuration errors to be noticed only after MaxScale was successfully
started. Now filters are loaded and the instance is created when a service applies its filters.
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.
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.
skygw_logmanager_init renamed to mxs_log_init and skygw_logmanager_done
renamed to mxs_log_finish. skygw_logmanager_exit removed alltogether as
all it did was to call skygw_logmanager_done. That appears to have been
a source for confusion as in many places a call to skygw_logmanager_done
was followed by a call to skygw_logmanager_exit. In addition, the function
skygw_log_done was removed from the header, since it lacked an
implementation.
The change to the mysql.user table in MySQL 5.7 caused MaxScale to stop
working with it. This commit adds functionality that checks which version of
the user data query should be made. It also moves common code related to
server version strings to server.c
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.
The native way for logging is now by syslog priority and not by
logfile id. In practice that means that there's a function -
mxs_log_message - that takes a syslog priority. The new logging
macros (MXS_ERROR and friends) call that directly and the old
ones as well after having the logfile id translated into the
equivalent priority.
What is enabled or not is still by logfile id and hence the
priority is internally translated into a logfile id when checking
whether something really should be logged or not.
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.