bm/magento-jsnlog

Magento Module to Log JavaScript Errors

This package's canonical repository appears to be gone and the package has been frozen as a result.

Installs: 235

Dependents: 0

Suggesters: 0

Security: 0

Type:magento-module

1.0.0 2017-01-20 12:12 UTC

This package is auto-updated.

Last update: 2023-01-20 22:41:10 UTC


README

This Module is writing all JS Errors that are thrown on your page to /var/log/jsnlog.log it use JSNLog, JSPHPLog and Mage::log for that.

Installation

Just add bm/magento-jsnlog to your composer.json

"bm/magento-jsnlog": "*",

and do composer update or install it with

composer require bm/magento-jsnlog

Usage

We need some JS Errors on the page to see if this Module is working ;-) Check if log file is filled from time to time. You can use Magento LogViewer to see the Log's in Magento Backend.

Example Log Entries

2016-11-23T09:39:24+00:00 DEBUG (7): [JSPHPLog]: Info message sent from JSNLog
2016-11-23T09:45:00+00:00 DEBUG (7): [JSPHPLog]: {"stack":"TypeError: Cannot read property 'action' of null\n    at klass.submit (http://testserver.de/product.html:3025:41)\n    at HTMLButtonElement.onclick (http://testserver.de/product.html:834:82)","message":"Cannot read property 'action' of null","name":"TypeError","logData":{"msg":"Uncaught Exception","errorMsg":"Uncaught TypeError: Cannot read property 'action' of null","url":"http://testserver.de/product.html","line number":3025,"column":41}}
2016-11-23T09:39:33+00:00 DEBUG (7): [JSPHPLog]: log message

Credits

Thx to JSNLog and JSPHPLog for the free OpenSource Software.

Licenses

JSNLog - License: MIT

JSPHPLog - License: GNU GPL

Magento JSNLog - License: GNU GPL