You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>The query log file can grow large quickly in high-traffic environments. Monitor disk space and consider implementing log rotation or periodic cleanup of the query log file.
67
+
51
68
### To enable database logging
52
69
53
70
1. Use the `dev:query-log` command to enable or disable database logging.
@@ -66,6 +83,24 @@ By default, Commerce writes database activity logs to the `<install-dir>/var/deb
66
83
bin/magento cache:flush
67
84
```
68
85
86
+
### To view query logs
87
+
88
+
You can view the query logs using standard file viewing commands:
89
+
90
+
```bash
91
+
# View the entire query log
92
+
cat var/debug/db.log
93
+
94
+
# View the last 100 lines of the query log
95
+
tail -n 100 var/debug/db.log
96
+
97
+
# Monitor the query log in real-time
98
+
tail -f var/debug/db.log
99
+
100
+
# Search for specific queries
101
+
grep "SELECT" var/debug/db.log
102
+
```
103
+
69
104
## Cron logging
70
105
71
106
With the release of version 2.3.1, Commerce now creates a separate `cron` log. \
@@ -108,4 +143,4 @@ Logging to `syslog` is disabled by default.
0 commit comments