Skip to content

Commit

Permalink
Merge pull request #13882 from craftcms/log-environment-in-context
Browse files Browse the repository at this point in the history
Log environment in context
  • Loading branch information
brandonkelly authored Nov 4, 2023
2 parents b66002e + 29789ab commit 9ae3c60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Addresses’ owner elements are now automatically set on them during initialization, if they were queried with the `owner` address query param.
- Entry Title fields are no longer shown when “Show the Title field” is disabled and there’s a validation error on the `title` attribute. ([#13876](https://github.com/craftcms/cms/issues/13876))
- Improved the reliability of image dimension detection. ([#13886](https://github.com/craftcms/cms/pull/13886))
- Log contexts now include the environment name. ([#13882](https://github.com/craftcms/cms/pull/13882))
- Added `craft\web\AssetManager::$cacheSourcePaths`.
- Fixed a bug where disclosure menus could be positioned off-screen on mobile.
- Fixed a bug where element edit pages could show a context menu when it wasn’t necessary.
Expand Down
2 changes: 2 additions & 0 deletions src/log/ContextProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public function __construct(
*/
public function __invoke(array $record): array
{
$record[$this->key]['environment'] = Craft::$app->env;

if (Craft::$app->getConfig()->getGeneral()->storeUserIps) {
$request = Craft::$app->getRequest();

Expand Down

0 comments on commit 9ae3c60

Please sign in to comment.