Re: how could I print the log into a file when server running?

From: Axel Schwenke <axel.schwenke_at_gmx.de>
Date: Wed, 16 Nov 2016 14:18:24 +0100
Message-ID: <o0hma0$btg$1_at_dont-email.me>


On 16.11.2016 11:51, Casa Zhang wrote:
> I compile the mysqld and trace the function stack by using VS2012, I want 'fprintf(stdout, ...)' something in the source code to understand the source well(is it a good idea to learn source code?). Anybody has some good idea to reach that?

The MySQL source code is already completely instrumented. Just build it with DEBUG enabled, then you can turn on debug output (including function calls and returns) while it runs. RTFM

https://dev.mysql.com/doc/refman/5.7/en/compiling-for-debugging.html
https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_debug
https://dev.mysql.com/doc/refman/5.7/en/dbug-package.html
Received on Wed Nov 16 2016 - 14:18:24 CET

Original text of this message