Add some more debugging messages

This commit is contained in:
Gergely Polonkai 2013-11-22 19:32:25 +01:00
parent 2f73630a38
commit 6c3ee3efda

View File

@ -59,9 +59,11 @@ wmud_db_init(GError **err)
{ {
GError *local_err = NULL; GError *local_err = NULL;
g_log(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Initializing database");
gda_init(); gda_init();
/* TODO: error checking! */ g_log(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Database DSN is \"%s\"", active_config->database_dsn);
dbh = gda_connection_open_from_string(NULL, active_config->database_dsn, NULL, GDA_CONNECTION_OPTIONS_THREAD_SAFE, &local_err); dbh = gda_connection_open_from_string(NULL, active_config->database_dsn, NULL, GDA_CONNECTION_OPTIONS_THREAD_SAFE, &local_err);
if (dbh == NULL) { if (dbh == NULL) {
@ -72,6 +74,8 @@ wmud_db_init(GError **err)
parser = gda_sql_parser_new(); parser = gda_sql_parser_new();
g_log(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Database initialization finished.");
return TRUE; return TRUE;
} }
@ -128,6 +132,7 @@ wmud_db_load_players(GError **err)
g_object_unref(iter); g_object_unref(iter);
g_object_unref(sth); g_object_unref(sth);
g_log(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Finished loading players");
return FALSE; return FALSE;
} }