Skip to content

Magento Commerce Cloud (Adobe Commerce Cloud) : Missing logs in debug.log

I have added logs in one of our controller using following code;

MagentoFrameworkAppObjectManager::getInstance()->get(PsrLogLoggerInterface::class)->debug('my log');

Sometimes the logs show up in var/log/debug.log and sometimes it doesn’t. It’s not caching issue since the controller is called using POST. The controller also seems to be working fine in most cases and reaching the logged piece of code since the data that needs to be written to the DB is being written. What maybe the issue?

We are using Adobe Commerce Cloud with Fastly Cache and CDN if it helps.