Steps for Magento 1
The logging needs to be enabled in several places. Follow these steps:
- Log in to the Magento Admin Panel.
- Go to the section "System -> Configuration -> Advanced -> Developer -> Log Settings".
- Set the option "Log enabled" to "Yes".
- In addition, enable the logging in the Magento extension (option "Logging" , "Debug" or similar).
- Flush the Magento caches in the section "System -> Cache Management".
The log files are stored in the Magento base directory in "var/log".
Steps for Magento 2
The logging needs to be enabled in several places. Follow these steps:
- Log in to the Magento Admin Panel.
- Enable the logging in the Magento extension (option "Logging" , "Debug" or similar)
- Then log in to the server via SSH.
- Navigate into the Magento base directory.
- Execute the following commands as the Magento filesystem owner (e.g. www-data):
bin/magento config:set dev/debug/debug_logging 1 bin/magento cache:flush ### NOTE: For Magento 2.2.8+ or 2.3.1+ do this instead: bin/magento setup:config:set --enable-debug-logging=true bin/magento cache:flush
The log messages are written to"var/log/debug.log". If in doubt, look at the timestamps of the log files.
To disable the logging:
bin/magento config:set dev/debug/debug_logging 0 bin/magento cache:flush ### NOTE: For Magento 2.2.8+ or 2.3.1+ do this instead: bin/magento setup:config:set --enable-debug-logging=false bin/magento cache:flush
See also Magento 2 DevDocs: Logging.