Skip to content

[Issue] Fix issue with logging each cookie as separate context #31471

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #31334: Fix issue with logging each cookie as separate context

Description (*)

When the number of cookies becomes more than 50 the warning log is written: "Unable to send the cookie. Maximum number of cookies would be exceeded." And each cookie is converting to a separate log context. And in the case of using the Graylog app, it is converting to a separate field.
By this pull request, the $_COOKIE array is converting to a string and writing as 'cookie' context while writing the log

Related Pull Requests

Fixed Issues (if relevant)

Manual testing scenarios (*)

  1. Exceed the number of cookies > 50
  2. Watch the log

Preconditions

Magento 2.4-develop

Steps to reproduce

  1. Open web browser Firefox
  2. Navigate to about:config
  3. Find dom.storage.enabled option and change to false
  4. Open Storefront in a new tab
  5. Duplicate the tab, open the same page in another tab
  6. Duplicate the tabs several times (3-4 new tabs)
  7. Open debug.log file from ./var/log folder
  8. Find the text "main.WARNING: Unable to send the cookie. Maximum number of cookies would be exceeded"

Actual Result

unableto sendcoockie

Expected Result

unableto send_coockieafter

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: StdlibFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions