Bug #4858: mysql_safe logs to syslog instead of stderr
mysqld_safe.sh: Overhaul the logging design, to allow logging mysqld messages to syslog. Add --syslog and --skip-syslog arguments for mysqld_safe. scripts/mysqld_safe.sh: Overhaul the logging design, to allow logging mysqld messages to syslog. Add two new options: --syslog and --skip-syslog. --syslog is the default, unless --log-error is also specified. If --log-error is specified (for mysqld_safe, mysqld, server, etc. - any group which mysqld_safe checks for arguments), then syslog is turned off. This is because mysqld will get the --log-error argument and log to a file anyways, which will be confusing to the user. If the user requests both --syslog and --log-error, a warning is printed (to mysqld_safe's stderr and to syslog), and we then behave as if --skip-syslog had been specified. Also, logging messages have been normalized somewhat: mysqld_safe now always prefixes messages with '<TIMESTAMP> mysqld_safe '. All messages go to the the console (stdout or stderr, depending on if it's a notice or an error) and to (the error log OR syslog). Also, a few cleanups while I'm here.
Showing
This diff is collapsed.
Please register or sign in to comment