Skip to content

Commit 13d4f0c

Browse files
committed
Fix debugging SQL queries via OPENQA_SQL_DEBUG
This broke with recent changes for the config file handling that now require the app singelton to be present when connecting to the database (which is done indirectly by `OpenQA::Schema::Profiler->enable_sql_debugging`).
1 parent acdc860 commit 13d4f0c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/OpenQA/Log.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,13 @@ sub setup_log ($app, $logfile = undef, $logdir = undef, $level = undef) {
202202
}
203203

204204
$app->log($log);
205+
OpenQA::App->set_singleton($app);
205206
if ($ENV{OPENQA_SQL_DEBUG} // $app->config->{logging}->{sql_debug} // 'false' eq 'true') {
206207
require OpenQA::Schema::Profiler;
207208
# avoid enabling the SQL debug unless we really want to see it
208209
# it's rather expensive
209210
OpenQA::Schema::Profiler->enable_sql_debugging;
210211
}
211-
212-
OpenQA::App->set_singleton($app);
213212
}
214213

215214
sub redact_settings ($vars) {

0 commit comments

Comments
 (0)