To enable database logging
-
Use the
dev:query-log
command to enable or disable database logging.bin/magento dev:query-log:enable
bin/magento dev:query-log:disable
-
Flush the cache.
bin/magento cache:flush
Cron logging
With the release of version 2.3.1, Commerce now creates a separate cron
log.
Commerce recently made cron logging more verbose, which provided more information but lengthened the system.log
considerably.
Moving cron
info to a dedicated log makes both logs easier to read.
By default, Commerce writes cron
info to the <install-directory>/var/log/cron.log
file.
Syslog logging
By default, Commerce writes syslog logs to the operating system syslog
file.
As of Commerce 2.3.1, you must use the magento
command to enable or disable the syslog.
The setting in the Admin has been removed.
To enable syslog logging
Logging to syslog
is disabled by default.
-
Use the
setup:config:set
command to change thedev/syslog/syslog_logging
database value totrue
.bin/magento setup:config:set --enable-syslog-logging=true
-
Flush the cache.
bin/magento cache:flush
To disable syslog logging
-
Use the
setup:config:set
command to change thedev/syslog/syslog_logging
database value tofalse
.bin/magento setup:config:set --enable-syslog-logging=false
-
Flush the cache.
bin/magento cache:flush