-
Tatjana Azundris Nuernberg authored
WL#7793: Add native support for syslog on unixoid platforms mysqld did not have native support for traditional unix-style syslog; it instead used a shell-script wrapper that would pipe the daemon's output to the syslog. This implied certain limitations: - it was impossible to see the syslog status at runtime - it was impossible to change the syslog status at runtime - the shell script could interfere with log rotation - the setup would often result in log lines containing two timestamps a) add native syslog support for unixoid OSs. The following can be set a start-up as well as viewed and set at runtime via system variables (requiring the SUPER privilege). --log_syslog[=0|1] on/off switch, defaults to off --log_syslog_include_pid[=0|1] Include mysqld's process ID on each syslog line? Defaults to on. (UNIX only) --log_syslog_facility=local5 choose the syslog "facility". Well-known facilities may be selected by name. Defaults to "daemon". (UNIX only) --log_syslog-tag=<string> If empty and by default, an ident of "mysqld" is used. If e.g. tag "abcd" is supplied, "mysqld-abcd" will be used. (The hyphen will be used automatically, the user need not supply it.) b) refactoring: mysys/my_syslog.cc and sql/log.cc had some duplication of effort with regard to the Windows EventLog. This patch attempts to eliminate the duplicates from log.cc, and merge the remaining useful code into my_syslog.cc so that other binaries may have a chance to benefit from it. c) Support features of a) on Windows where possible. d) Update mysqld_safe to use features of a) instead of trying to emulate them in the wrapper script where possible, with as little change in syntax as possible.
Tatjana Azundris Nuernberg authoredWL#7793: Add native support for syslog on unixoid platforms mysqld did not have native support for traditional unix-style syslog; it instead used a shell-script wrapper that would pipe the daemon's output to the syslog. This implied certain limitations: - it was impossible to see the syslog status at runtime - it was impossible to change the syslog status at runtime - the shell script could interfere with log rotation - the setup would often result in log lines containing two timestamps a) add native syslog support for unixoid OSs. The following can be set a start-up as well as viewed and set at runtime via system variables (requiring the SUPER privilege). --log_syslog[=0|1] on/off switch, defaults to off --log_syslog_include_pid[=0|1] Include mysqld's process ID on each syslog line? Defaults to on. (UNIX only) --log_syslog_facility=local5 choose the syslog "facility". Well-known facilities may be selected by name. Defaults to "daemon". (UNIX only) --log_syslog-tag=<string> If empty and by default, an ident of "mysqld" is used. If e.g. tag "abcd" is supplied, "mysqld-abcd" will be used. (The hyphen will be used automatically, the user need not supply it.) b) refactoring: mysys/my_syslog.cc and sql/log.cc had some duplication of effort with regard to the Windows EventLog. This patch attempts to eliminate the duplicates from log.cc, and merge the remaining useful code into my_syslog.cc so that other binaries may have a chance to benefit from it. c) Support features of a) on Windows where possible. d) Update mysqld_safe to use features of a) instead of trying to emulate them in the wrapper script where possible, with as little change in syntax as possible.
Loading