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.
Comment | File | Size | Author |
---|---|---|---|
#2 | 3319558-enable-debug-logging--2.patch | 1.42 KB | slucero |
Comments
Comment #2
sluceroComment #3
jordanpagewhite CreditAttribution: jordanpagewhite at Red Hat commentedThese 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...
Comment #4
sluceroComment #6
sluceroThanks @jordanpagewhite! Merged for inclusion in the beta 6 release.