Print g_log messages to stdout as well

This handles an edge-case in case the message arrives
before the UI is up, there is still a message printed,
before Ardour crashes (e.g. when setup_windows() fails).
This commit is contained in:
Robin Gareus 2021-09-20 04:16:09 +02:00
parent 5a1201f05b
commit 851fab7ec3
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 4 additions and 4 deletions

View File

@ -666,7 +666,7 @@ ARDOUR_UI::post_engine ()
AudioEngine::instance()->BecameSilent.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::audioengine_became_silent, this), gui_context());
if (setup_windows ()) {
throw failed_constructor ();
throw failed_constructor (); // TODO catch me if you can
}
transport_ctrl.map_actions ();

View File

@ -121,6 +121,9 @@ gui_jack_error ()
#ifndef NDEBUG
static void ardour_g_log (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) {
g_log_default_handler (log_domain, log_level, message, NULL);
switch (log_level) {
case G_LOG_FLAG_FATAL:
fatal << "g_log: " << message << endmsg;
@ -414,9 +417,6 @@ int main (int argc, char *argv[])
}
#ifndef NDEBUG
g_log_set_handler (NULL,
GLogLevelFlags (G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL | G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_RECURSION),
&ardour_g_log, NULL);
g_log_set_default_handler (&ardour_g_log, NULL);
#endif