MXS-1819 Also log info messages to syslog

If info messages are enabled, they will be logged to syslog
just like any other messages.
This commit is contained in:
Johan Wikman
2018-04-24 10:02:47 +03:00
parent 70f3f61ac4
commit 57cfb709b8
2 changed files with 5 additions and 3 deletions

View File

@ -306,9 +306,10 @@ not regularly.
Since *MariaDB MaxScale* can log to both file and *syslog* an approach that Since *MariaDB MaxScale* can log to both file and *syslog* an approach that
provides maximum flexibility is to enable *syslog* and *log_to_shm*, and to provides maximum flexibility is to enable *syslog* and *log_to_shm*, and to
disable *maxlog*. That way messages will normally be logged to *syslog*, but if disable *maxlog*. That way messages will normally be logged to *syslog*, but if
there is something to investigate, *log_info* and *maxlog* can be enabled from there is something to investigate, *log_debug* and *maxlog* can be enabled from
*maxadmin*, in which case informational messages will be logged to the *maxadmin*, in which case informational messages will be logged to the
*maxscale.log* file that resides in shared memory. *maxscale.log* file that resides in shared memory. But note that *log_debug*
messages will only be available if MaxScale has been built in debug mode.
By default, logging to shared memory is disabled. By default, logging to shared memory is disabled.

View File

@ -896,11 +896,12 @@ static int logmanager_write_log(int priority,
case LOG_ERR: case LOG_ERR:
case LOG_WARNING: case LOG_WARNING:
case LOG_NOTICE: case LOG_NOTICE:
case LOG_INFO:
syslog(priority, "%s", message); syslog(priority, "%s", message);
break; break;
default: default:
// LOG_INFO and LOG_DEBUG messages are never written to syslog. // LOG_DEBUG messages are never written to syslog.
break; break;
} }
} }