0

After upgrading a site from Magento 2.1.x to 2.2.3, log output is no longer being written to var/log/debug.log. There was nothing in the 2.2.0 change log about this behavior.

5

Magento 2.2.0 added a "Log to File" option in STORES > Configuration > ADVANCED > Developer:

enter image description here

By default, this option is disabled. If you enable this option, content will be written to var/log/debug.log again. If you are in the backend of a site in production mode, you won't see this configuration field. You'll need to manually change this setting in the database using a query like this:

INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`)
VALUES
    ('default', 0, 'dev/debug/debug_logging', '1');

Note #1: caution should be taken before enabling logging on a site running in production to avoid private data being written to this log file.

Note #2: Logging behavior for shipping/payment methods is changing in 2.2.4, per this note in the change log: Magento now provides dedicated payment and shipping debug log files to store information specific to those functional areas.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.