Skip to content

Yii2 Debug toolbar - allow DB logs with an admin account #14985

Closed Answered by brandonkelly
Anubarak asked this question in Ideas
Discussion options

You must be logged in to vote

Since Craft 4, DB profiling and logging are only enabled for Dev Mode by default, but you can customize it by overriding the db component config in config/app.php:

return [
    'components' => [
        'db' => function() {
            $config = craft\helpers\App::dbConfig();
            $config['enableLogging'] = true;
            $config['enableProfiling'] = true;
            return Craft::createObject($config);
        },
    ],
];

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Anubarak
Comment options

Answer selected by brandonkelly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants