[MXS-4192] Change syslog default to false Created: 2022-07-06  Updated: 2022-08-01  Resolved: 2022-07-28

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: None
Fix Version/s: 22.08.0

Type: New Feature Priority: Minor
Reporter: Kathryn Sizemore Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

MaxScale GUI Log defaults to display syslog (syslog=true), but logs are going to /var/lib/maxscale/maxscale.log. This displays a "No logs found" message for all new installs.
syslog variable should default to false.



 Comments   
Comment by markus makela [ 2022-07-11 ]

By default logs go to both syslog and maxlog as they are both enabled by default. Is this in a container environment or is there some other reason why syslog (or journald to be more specific) doesn't contain the messages?

Comment by Kathryn Sizemore [ 2022-07-11 ]

I'm using the maxscale docker images. Either way, I don't think we should be logging to both syslog and the maxscale.log file by default.

Comment by Kathryn Sizemore [ 2022-07-11 ]

Out of the box the maxscale docker image does not log anything. This is a problem.

Comment by markus makela [ 2022-07-12 ]

I agree, the defaults have been pretty dumb for a while but disabling one of the log types does affect those users who expects the one they use to work. I think a better option would be to get rid of both syslog and maxlog parameters and introduce a new one called log_type which would be a multi-valued enumeration that allows you to select which sources the log messages are written into. Regardless of what we do, we'll have to pick a default log source. For non-docker setups I believe the systemd journal would be the better option as it provides a more structured way of storing information with log messages.

For the short term, I think we could fix the problem by disabling syslog if MaxScale knowns the systemd-journald isn't up. This would mean the log output in the GUI would default to the file-based logging in docker containers.

As for the docker images, this is a known problem and it's tracked in MXS-3457.

Comment by markus makela [ 2022-07-21 ]

Turns out detecting whether the systemd journal daemon is up and functional isn't that easy with the native APIs which means the sensible approach is to just disable it by default and rely on MaxScale's own log.

Comment by markus makela [ 2022-07-28 ]

syslog is now off by default.

Generated at Thu Feb 08 04:26:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.