Commit aca2b28e authored by unknown's avatar unknown

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.
parent 1fe6d151
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment