The logging needs to be enabled in Magento 2 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 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 setup:config:set --enable-debug-logging=false bin/magento cache:flush
See also Magento 2 DevDocs: Logging.