debug: add detailed logging to CustomCSSInjector
Temporary logging to diagnose why CSS is not injecting in production 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -35,14 +35,21 @@ final class CustomCSSInjector
|
||||
*/
|
||||
public function injectCriticalCSS(): void
|
||||
{
|
||||
error_log('ROI CustomCSS: injectCriticalCSS CALLED');
|
||||
|
||||
$pageType = $this->getCurrentPageType();
|
||||
error_log('ROI CustomCSS: pageType=' . $pageType);
|
||||
|
||||
$snippets = $this->getCriticalUseCase->execute($pageType);
|
||||
error_log('ROI CustomCSS: critical snippets count=' . count($snippets));
|
||||
|
||||
if (empty($snippets)) {
|
||||
error_log('ROI CustomCSS: NO critical snippets, returning');
|
||||
return;
|
||||
}
|
||||
|
||||
$css = $this->combineSnippets($snippets);
|
||||
error_log('ROI CustomCSS: critical CSS length=' . strlen($css));
|
||||
|
||||
if (!empty($css)) {
|
||||
printf(
|
||||
@@ -57,14 +64,21 @@ final class CustomCSSInjector
|
||||
*/
|
||||
public function injectDeferredCSS(): void
|
||||
{
|
||||
error_log('ROI CustomCSS: injectDeferredCSS CALLED');
|
||||
|
||||
$pageType = $this->getCurrentPageType();
|
||||
error_log('ROI CustomCSS: deferred pageType=' . $pageType);
|
||||
|
||||
$snippets = $this->getDeferredUseCase->execute($pageType);
|
||||
error_log('ROI CustomCSS: deferred snippets count=' . count($snippets));
|
||||
|
||||
if (empty($snippets)) {
|
||||
error_log('ROI CustomCSS: NO deferred snippets, returning');
|
||||
return;
|
||||
}
|
||||
|
||||
$css = $this->combineSnippets($snippets);
|
||||
error_log('ROI CustomCSS: deferred CSS length=' . strlen($css));
|
||||
|
||||
if (!empty($css)) {
|
||||
printf(
|
||||
|
||||
Reference in New Issue
Block a user