Skip to content

Commit

Permalink
Fixed DB logging upgrade docs
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Jan 14, 2024
1 parent 5de5ef6 commit 2a21348
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions docs/4.x/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,19 @@ The [logging system](./logging.md) in Craft 4 has undergone some significant cha
],
],
```
- Query logging and query profiling are no longer enabled by default when `devMode` is on. These can be manually adjusted by setting <yii2:yii\db\Connection::$enableLogging> and <yii2:yii\db\Connection::$enableProfiling> from `config/app.php`:
- Query logging and query profiling are no longer enabled by default, except when Dev Mode is on. These can be manually adjusted by setting <yii2:yii\db\Connection::$enableLogging> and <yii2:yii\db\Connection::$enableProfiling> from `config/app.php`:
```php
return [
'components' => [
'db' => [
'enableLogging' => true,
'enableProfiling' => true,
],
'db' => function() {
$config = craft\helpers\App::dbConfig();

// Always enable DB logging and profiling
$config['enableLogging'] => true;
$config['enableProfiling'] => true;

return Craft::createObject($config);
},
],
];
```
Expand Down

0 comments on commit 2a21348

Please sign in to comment.