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:

  1. Log in to your Site24x7 account.
  2. Download and install the Site24x7 Server Monitoring agent (Windows | Linux).
  3. Go to Admin > AppLogs > Log Profile and select Add Log Profile.
  4. Enter the Profile Name.
  5. 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.
  6. 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.
  7. You can also associate this log profile with monitors, monitor groups, or corresponding severs. Learn more.
  8. Click Save.
Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.