[MDEV-10451] mysql/mysqld/mysql_install_db writes messages to STDERR that probaly should be written to STDOUT Created: 2016-07-27  Updated: 2017-06-22  Resolved: 2017-06-22

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 5.5.42, 5.5, 10.0, 10.1
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Josef Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: upstream-fixed


 Description   

mysql/mysqld/mysql_install_db do write a lot of "[Note]" messages out to STDERR, and only some messages to STDOUT.

It seems like most of these info messages should be written to STDOUT and not to STDERR judging from their importance.

The problem is discussed more in detail at the following link, with examples.

https://github.com/vorburger/MariaDB4j/issues/27

Verified in 5.5.33.
Problem seems to be solved in 10.1.x versions, tested 10.1.13.



 Comments   
Comment by Elena Stepanova [ 2016-07-27 ]

There seems to be some confusion here.

First, the initial complaint in https://github.com/vorburger/MariaDB4j/issues/27 is not related to mysql_install_db, the quoted log is from a normal server startup.

Secondly, I don't see any difference in mysql_install_db (or mysqld) logging behavior between 5.5 and 10.1, on the contrary, 10.1 mysql_install_db writes much more into stderr because it runs with InnoDB which is very verbose, while 5.5 writes barely anything at all.

For the initial problem, I agree that it exists. I don't believe we can start printing notes into stdout, it can break more things than I can think of, but there should be more flexible control over the error log.

There is a partial workaround in 10.1, the option --silent-startup helps to suppress some messages, but as its name states, it only works on startup.

5.7 introduced the option log-error-verbosity, I think we should consider having it in 10.2.

Morpa, you also mentioned mysql in the description, what's the problem with it?

Comment by Sergei Golubchik [ 2016-07-27 ]

We have --log-warnings=N and --verbose and now --silent-startup. I don't think we need more verbosity-controlling options, if anything we need less.

Anyway, MariaDB does not print anything specifically to STDERR or STDOUT. It prints to the error log. Which happen to be STDERR by default, but can be redirected to a file with the --log-error command line option. So, log messages that are printed to one log, cannot be later split to two file descriptors.

Your options are: use --log-warnings=N or --silent-startup. Or send the error log to a file. Or filter the output in your library to show only messages with the [ERROR] tag.

Generated at Thu Feb 08 07:42:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.