Magento Logs
Magento is an open-source e-commerce platform primarily used for building e-commerce applications. By default, Magento does not keep track of errors and logs, but you can enable Magento error logs to debug issues. With Site24x7 AppLogs, you can index, monitor, and retrieve your Magneto logs when needed.
Instructions:
- Log in to your Site24x7 account.
- Download and install the Site24x7 Server Monitoring agent (Windows | Linux).
- Go to Admin > AppLogs > Log Profile and select Add Log Profile.
- Enter the Profile Name.
- For Choose the Log Type, select Magento Logs from the drop-down list.
- The Pattern and Sample Logs are displayed below. By default, this is the log pattern identified by Site24x7 AppLogs for Magento logs:
[$DateTime:date$] !$Channel$.!$LogLevel$: $Message$
Sample Logs:
[2021-07-03 15:29:48] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["CONFIG"],"mode":"matchingTag"}} []
[2021-07-03 15:29:48] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["LAYOUT_GENERAL_CACHE_TAG"],"mode":"matchingTag"}} []
[2021-07-03 15:29:48] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["BLOCK_HTML"],"mode":"matchingTag"}} []
This log is separated into fields, each of which takes its respective value and is then uploaded to Site24x7. - You can also add a custom log pattern instead of the default one. To do so, click the pencil icon and specify your pattern. Additionally, provide three examples for us to understand and query your custom log pattern.
- The Pattern and Sample Logs are displayed below. By default, this is the log pattern identified by Site24x7 AppLogs for Magento logs:
- Select the Log Source. By default, the paths below are used as a file source:
Linux: "/var/www/html/Magento*/var/log/*.log",
"/var/www/html/magento*/var/log/*.log",
"/var/www/html/*/var/log/*.log"
If your source path is different from the default path, specify it while adding the log profile. - You can also associate this log profile with monitors, monitor groups, or corresponding severs. Learn more.
- Click Save.