foozle-tracker

1.0.22 • Public • Published

FoozleJS

===================

FoozleJS it's a tiny library that allow you to register errors of your web applications, and fix it faster.

npm version Package Quality Join the chat at https://gitter.im/techfort/LokiJS

Tracking javascript errors.

How to use

   <script src="https://cdn.jsdelivr.net/foozlejs/1.0.11/index.min.js"></script>
    <script type="text/javascript">
        window._foozlejs = {
            token: '<PROJECT_TOKEN>',
        };
    </script>
  • 4.- If your application have any error, you will see it in the dashboard.

Or you can import foozleJS in your javascript and decide when you want to report an error

 npm install --save foozle-tracker 
 import FoozleJS from 'foozle-tracker';
 
 const foozle = new FoozleJS({ token: '<TOKEN_PROJECT>' }, window, document); // Window and Document are optionals
 foozle.initAPI(); // To init listeners
 foozle.api.track("Registering an error") // Send an error (String, object, etc..)

Example:

fetch(url_to_fetch, {
   credentials: 'include',
   method: 'POST',
}).then(() => {
   // Whatever
}).catch((error) => {
    foozle.api.track(error)
});
 

or

$.ajax("http://httpstat.us/500")
    .done(() => {
        console.log("ok");
    }).fail((error) => {
        foozle.api.track(error)
    });

What FoozleJS offers?


All context of your application on the moment of the error. (Dependencies, Network, userAgent, consoles, and extra data)

Configurations.


    <script type="text/javascript">
        window._foozlejs = {
            token: '<PROJECT_TOKEN>',
            console: {
                log: true, // console.warn("Registering console logs.")
                warn: true, // console.warn("Registering console warn.")
                error: true, // console.warn("Registering console error.")
            },
        };
    </script>

Package Sidebar

Install

npm i foozle-tracker

Weekly Downloads

19

Version

1.0.22

License

ISC

Unpacked Size

703 kB

Total Files

27

Last publish

Collaborators

  • jojo5716