Problem/Motivation

Currently, logging of various exceptions during the process of parsing and loading pattern libraries is suppressed. In most cases, this is inconsequential as the failed patterns are not made available for use, but making the logged output available will make it easier for users to identify and clean up issues in their pattern libraries.

By enabling debug mode in the services.yml file for a site, as documented in the patternkit.services.yml file, these exceptions encountered during the library parsing process will be logged in the watchdog logs. Depending on caching configurations, these logged events may be repetitive and numerous, however, so it is not advised to enable this on production environments.

CommentFileSizeAuthor
#2 3319558-enable-debug-logging--2.patch1.42 KBslucero
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

slucero created an issue. See original summary.

slucero’s picture

jordanpagewhite’s picture

These changes look good to me. I evaluated the patch changes against the latest state of the 9.1.x branch. $debug is used here (for posterity) https://git.drupalcode.org/project/patternkit/-/blob/9.1.x/src/Asset/Pat..., and the trait https://git.drupalcode.org/project/patternkit/-/blob/9.1.x/src/Patternki... and the patternkit.environment service's isDebug() method https://git.drupalcode.org/project/patternkit/-/blob/9.1.x/src/Patternki...

slucero’s picture

Status: Needs review » Reviewed & tested by the community

  • 87d5a75 committed on 9.1.x
    Issue #3319558 by slucero, jordanpagewhite: Enable debug logging for...
slucero’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @jordanpagewhite! Merged for inclusion in the beta 6 release.

Status: Fixed » Closed (fixed)

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