8 Commits

Author SHA1 Message Date
Johan Wikman
cf0aeed516 MXS-2014 Rename log_manager.h to log.h
There's nothing resembling a manager anymore.
2018-08-17 10:59:37 +03:00
Markus Mäkelä
5a306aa20a
MXS-2005: Use log manager only after initialization
The log manager functions must not be used before it is initialized.
2018-08-14 14:57:34 +03:00
Johan Wikman
b5fdcf66ab Make test_event.cc more resilient
- Work on both Debian and RedHat systems.
- Ignore test if authentication log cannot be found or cannot be read.
2018-06-27 09:30:31 +03:00
Johan Wikman
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
Johan Wikman
998798c90c Make test_event more reliable
Look for the expected message several times, with short sleeps in
between. That way we will not sleep more than necessary, yet will
not immediately give up either.
2018-06-21 15:42:50 +03:00
Johan Wikman
68e514f08b Fix test_event
If the logged line is found, it is not an error, if it is not,
it is.
2018-06-20 13:01:20 +03:00
Johan Wikman
6e3d3c0dcf MXS-421 Test that used facility has an effect
If the facility of an event is LOG_AUTH, it should by default
end up in /var/log/auth.log.
2018-06-18 11:32:50 +03:00
Johan Wikman
4c1b7f761c MXS-421 Add maxscale::event concept
MaxScale now defines events for which the syslog
facility and level can explicitly be defined by the
administrator. Currently there is only one such
event, namelt AUTHENTICATION_FAILURE.

In a subsequent commit, config.cc will be modified so
that event-related configuration parameters are passed
to event::configure() and in another subsequent commit
the authenticators will be modifed to use this mechanism.

In practice a line like:

   MXS_WARNING("%s: login attempt for user '%s'@[%s]:%s, "
               "authentication failed.",
               dcb->service->name, client_data->user,
               dcb->remote, dcb->path);

will be changed to

    MXS_LOG_EVENT(event::AUTHENTICATION_FAILURE,
                  "%s: login attempt for user '%s'@[%s]:%s, "
                  "authentication failed.",
                  dcb->service->name, client_data->user,
                  dcb->remote, dcb->path);
2018-06-18 11:32:50 +03:00