List:Packagers« Previous MessageNext Message »
From:Lenz Grimmer Date:January 21 2003 4:59pm
Subject:Re: [packagers] Rotating the error log and fprintf(stderr,...) in
sql/
View as plain text  
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On Thu, 9 Jan 2003, Christian Hammers wrote:

> The MySQL server has many fprintf(stderr, ...) lines for printing error.
> As mysqld is started from mysqld_safe (or safe_mysqld before 4.x) with
> nohup the output of stderr goes to some file. I guess that is the same
> for all distros.

If they stick closely to how we have written our startup script, yes.

> The problem is now, that I want to rotate this file because endlessly
> growing log files are inelegant and dangerous.

Agreed.

> But I can't as "flush-logs" has no effect on the process' own stderr.
>
> Any ideas? Apart from writing Monty a diff that changes every
> stderr message to a syslog call which at least I would see as
> "the right way(tm)" for a server to talk to me.

This would be quite nice :) Right now, MySQL does not make use of syslog,
except when you compile it with TCP wrapper support (it will then log
denied connections to syslog). Having a configure flag "--with-syslog"
would be a nice addition. It may even be on our ever-growing TODO...

> Oh, I just see, another option could be to enable this option for UNIX,
> too and put this freopen() call into the flush function, too.

If you have a working solution, a patch is always welcome :) Thanks in
advance.

Bye,
	LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /      Mr. Lenz Grimmer <lenz@stripped>
 / /|_/ / // /\ \/ /_/ / /__     MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/     Hamburg, Germany
       <___/   www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+LXyLSVDhKrJykfIRArvXAJ9ZOnwBdiO+v8jzAYOA6CeXx1P/+ACfc0WH
6oiMRuIQCC6kVW6zUaCJctM=
=0K++
-----END PGP SIGNATURE-----

Thread
Rotating the error log and fprintf(stderr,...) in sql/Christian Hammers9 Jan
  • Re: [packagers] Rotating the error log and fprintf(stderr,...) insql/Lenz Grimmer21 Jan