diff --git a/CHANGELOG.md b/CHANGELOG.md index 69fab59328b..5aeb0bfb91b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/src/log/ContextProcessor.php b/src/log/ContextProcessor.php index 5a8a74ff221..08e5779dd38 100644 --- a/src/log/ContextProcessor.php +++ b/src/log/ContextProcessor.php @@ -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();