[MDEV-20344] startup messages belong in stderr/error-log not stdout Created: 2019-08-14 Updated: 2023-01-06 Resolved: 2023-01-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.1, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.11.2, 11.0.1, 10.3.38, 10.4.28, 10.5.19, 10.6.12, 10.7.8, 10.8.7, 10.9.5, 10.10.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Reindl Harald | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | beginner-friendly | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
this annoying message don't belog to stdout and i have pointed this out years ago on the mailing list after the update which introduced it with a heatet discussion because most people spoke up didn't gasp what i am talking about we have maraidb logfiles and so there is no point to spit out anything ond stdout which on other init systems won't be seen at all Aug 14 04:02:41 backup-dbmail systemd[1]: Stopping MariaDB Replication... |
| Comments |
| Comment by Sergei Golubchik [ 2020-08-24 ] |
|
I'd say it's questionable whether it's a bug. The message is printed as soon as the server executable is started, before command line options are parsed. So it cannot possibly go into the error log. The only way to fix it is to stop printing an early "starting" message altogether. I don't really know how many users rely on it, so I cannot say if it's safe to remove. Given the risk, I tend to think that it's far safer to redirect stderr to /dev/null if needed, intead of removing this early message for everyone. |
| Comment by Reindl Harald [ 2020-08-24 ] |
|
> I tend to think that it's far safer to redirect stderr to /dev/null if needed nobody right in his mind redirects stderr to /dev/null and nobody needs that message at all, systemd tells you the processid anyways and for the rare systems which still use initscripts that message wasn't there all the years |
| Comment by Reindl Harald [ 2020-08-24 ] |
|
> [Note] /usr/libexec/mysqld (mysqld 10.2.26-MariaDB) starting as process 496132 BTW: next time you design something like that do it with using your brain and don't spit a variable version number in the middle so that you can't write a proper rsyslog filter "/usr/libexec/mysqld starting as process 496132" would have been enough, i know which versions are installed and if i don't know it's time top get back control |
| Comment by Reindl Harald [ 2020-08-24 ] |
|
in a sane world one could just log to syslog: MDEV-23555 |
| Comment by Sergei Golubchik [ 2020-08-29 ] |
|
Ok, sorry. I stand corrected. I used to think this message is printed almost immediately on startup. Perhaps it was. But now it's printed after all options are parsed. At that point the configured error log destination is known and it surely should be able to use it. I'd even say that the intention was to print this line into the error log, not stderr. Last commit that touched it was " |
| Comment by Daniel Black [ 2022-10-26 ] |
|
Corrected in https://github.com/MariaDB/server/pull/1979#issuecomment-1291460656 |
| Comment by Oleksandr Byelkin [ 2023-01-05 ] |
|
OK to push |
| Comment by Daniel Black [ 2023-01-06 ] |
|
Thanks for the review sanja. Happy to have this fixed finally. |