Problem/Motivation

When logging I found this error and the site breaks.

Proposed resolution

Extract the display username from Drupal\\Core\\Session\\AccountProxy and avoid having an object around that won't be logged.

Remaining tasks

Accept path forward and create a test.

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#2 2980802-syslog-context-user-2.patch803 bytespenyaskito

Comments

penyaskito created an issue. See original summary.

penyaskito’s picture

Status: Active » Needs review
StatusFileSize
new803 bytes

Patch

dagmar’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Thanks @penyaskito!

We have the same issue in dblog #2703877: Logger tries to replace {users_field_data} with current user object . Could you take a look to the comments there so you can provide a test here.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dagmar’s picture

Status: Needs work » Closed (duplicate)

Marking as duplicate of #2986294: Remove $context['user'] from LoggerChannel::log @penyaskito could you take a look to the patch provided there?