Skip to content

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Magento 2 JS Error Tracker

This Magento 2 module tracks JavaScript errors on the frontend of your store and logs them for further debugging. It helps developers and store owners monitor and manage errors related to JavaScript, enhancing troubleshooting efforts.

Features

  • Tracks JavaScript errors in the browser.
  • Sends logs to the Magento backend for easy access and troubleshooting.
  • Configurable logging levels (default is INFO).
  • Logs errors in the /var/log/frontend_js_errors.log file.
  • Supports Magento 2.x versions.

Installation

1. Download the module

You can either clone the repository or download the module as a zip and upload it to your Magento installation.

git clone https://github.com/SyntaxIDK/Magento-2-Frontend-Error-Tracker.git

Alternatively, download the module zip and extract it in the /app directory.

2. Enable the Module

Run the following Magento CLI commands to enable the module:

php bin/magento module:enable Syntaxidk_Tracker
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush

3. Verify Module Installation

After running the commands above, verify that the module has been installed successfully by checking the list of enabled modules:

php bin/magento module:status

You should see Syntaxidk_Tracker listed as enabled.

Configuration

The module is enabled by default, and it logs JavaScript errors into the frontend_js_errors.log file located in the /var/log/ directory of your Magento installation. The default logging level is set to INFO.

If you wish to disable the module or modify the logging configuration, you can do so by updating the di.xml and other configuration files in the module.

Log File Path

The log file is stored at:

/var/log/frontend_js_errors.log

This path can be updated if needed. You can customize the path by modifying the Frontend.php file located in app/code/Syntaxidk/Tracker/Logger/Handler/Frontend.php.

Log Level

The log level for this module is set to INFO by default. You can modify the log level by editing the Frontend.php file within the Handler directory.

Usage

Once installed and enabled, the module will automatically start tracking JavaScript errors on the frontend of your Magento store. These errors will be logged into the specified log file (frontend_js_errors.log).

You can review the logs to troubleshoot JavaScript issues and fix them to improve the overall user experience.

Troubleshooting

  1. Errors Not Showing in Log File: If you are not seeing errors in the log file, ensure that the Magento log system is working correctly. Check that the file permissions are correct for the /var/log directory.
  2. Module Not Working: Ensure that the module is correctly enabled and that you've flushed the cache after running the necessary Magento CLI commands.

License

This module is released under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages