Getting started with JsLog.me

What is JsLog.me service?

JsLog.me is a client-side error tracking service for web sites, web applications and hybrid PhoneGap/Cordova applications. It brings all errors, exceptions, messages and events from client side to the cloud. Centralized log management lets you reveal errors, their context, impact, and reproduction ways.

Installation

Sign up with JsLog.me and create a new project. After that install tracking code to your site/application. You can use link from jslog.me cdn, or download local copy directly (original, minified) or with package managers.

Web application / Web site

If you are developing a Web-application (usual case) just get a code and insert it in a head section.

<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="//jslog.me/js/jslog.js"></script>
    <script type="text/javascript">jslog = new JsLog({key: "YOUR-API-KEY"});</script>
</head>
<body>
   .... Rest of file

By default these options are enabled:

  • Catch unhandled exceptions - log all uncaught exceptions
  • Hook console - drop-in replacement for browser's console API
  • Track client - mark each client with a small tag
  • Collect system info - collect basic client browser information
  • Track launches - track every page launch

Hybrid / mobile application (Cordova / PhoneGap)

cordova-64.png If you are developing mobile / hybrid application it should work without permananet internet connection. So download jslog.me script file and place it in your local folder. Then get your API key for project and insert logging code in a head section.

<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="js/jslog.js"></script>
    <script type="text/javascript">jslog = new JsLog({key: "YOUR-API-KEY"});</script>
</head>
<body>
   .... Rest of file

Using package managers

Install JsLog.me with bower.io

bower-64.pngBower is a client-side package manager, it is extremely helpful in *[CI](Continuous integration) process.

bower install jslog-me

now you include tracking code in html script

<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="bower_components/jslog-me/dist/jslog.min.js"></script>
    <script type="text/javascript">jslog = new JsLog({key: "YOUR-API-KEY"});</script>
</head>
<body>
   .... Rest of file

Install JsLog.me with NPM

npm-64.pngNPM is a package manager for node.js

npm install jslog --save

now you include tracking code in html script

<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="node_modules/jslog/dist/jslog.min.js"></script>
    <script type="text/javascript">jslog = new JsLog({key: "YOUR-API-KEY"});</script>
</head>
<body>
   .... Rest of file