Problem/Motivation

LoggerChannelInterface misleadingly states that:

some useful data set in the $context argument of log(): request_uri, referer, ip, user, uid.

When user is not actually set.

Proposed resolution

  1. Remove user from documentation.
  2. Add link, channel and timestamp.

Remaining tasks

Patch
Review
Commit

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

TBD

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RoSk0 created an issue. See original summary.

RoSk0’s picture

Assigned: RoSk0 » Unassigned
Issue summary: View changes
Status: Active » Needs review
FileSize
815 bytes

Extended scope to list all available data.

Initial patch version.

RoSk0’s picture

Added parent introduced the issue.

Abhijith S’s picture

FileSize
46.59 KB

Applied patch #2 and it removes the word user and adds link, channel and timestamp.

after

quietone’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Bug Smash Initiative

The change agrees with the default logger code in terms of what the array keys of the context array are.

Therefor, setting to RTBC.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 3213928-2.patch, failed testing. View results

murilohp’s picture

Status: Needs work » Reviewed & tested by the community

The error is probably a random fail, setting to RTBC again.

quietone’s picture

Status: Reviewed & tested by the community » Needs work

@murilohp, it is better to confirm that the failing test is in fact one of the random ones, which are listed in #2829040: [meta] Known intermittent, random, and environment-specific test failures. Looking at the test results, the failing test is Drupal\Tests\Composer\Plugin\Scaffold\Functional\ComposerHookTest::testComposerHooks which is not listed on that page. Until we know for sure if that is a new random fail or not, or related to the patch (yes, I don't think it is) this should stay at Needs Work. Whatever the reason, that needs to be understood first. For that reason and to save resources (cost of running tests) setting this back to NW which will give some time to those who know that particular test to have a look.

murilohp’s picture

@quietone thanks for the response! I had no idea about the specific test failures, I'll investigate more this failed scenario.

murilohp’s picture

We already have an issue to solve the test error! #3255863. I think we can wait for this, reroll the patch and then move back to RTBC.

murilohp’s picture

Status: Needs work » Reviewed & tested by the community

Now the #3255863 is merged, I retested the patch #2, and it's passing, moving back to RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 1e65e36e7e6 to 10.0.x and 1d64f860f3b to 9.4.x and 39a075f30aa to 9.3.x. Thanks!

Backported to 9.3.x since this is only documentation.

  • alexpott committed 1e65e36 on 10.0.x
    Issue #3213928 by RoSk0: LoggerChannelInterface documentation
    

  • alexpott committed 1d64f86 on 9.4.x
    Issue #3213928 by RoSk0: LoggerChannelInterface documentation
    
    (cherry...

  • alexpott committed 39a075f on 9.3.x
    Issue #3213928 by RoSk0: LoggerChannelInterface documentation
    
    (cherry...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.