From 2d5dadb8d15a936b8326bc08b24d81ecbbadcdd0 Mon Sep 17 00:00:00 2001 From: psquickitjayant Date: Tue, 9 Dec 2014 21:31:48 +0530 Subject: [PATCH 1/2] Updated setConsoleErrors to sendConsoleErrors --- src/loggly.tracker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/loggly.tracker.js b/src/loggly.tracker.js index ad272c2..7693d39 100644 --- a/src/loggly.tracker.js +++ b/src/loggly.tracker.js @@ -89,8 +89,8 @@ return; } - if(data.setConsoleError !== undefined) { - setSendConsoleError(self, data.setConsoleError); + if(data.sendConsoleErrors !== undefined) { + setSendConsoleError(self, data.sendConsoleErrors); } if(data.logglyKey) { From b1b00cf5ee2b5fc9d568e3441bfea6bab4c7e4df Mon Sep 17 00:00:00 2001 From: psquickitjayant Date: Wed, 10 Dec 2014 02:07:09 +0530 Subject: [PATCH 2/2] Added usage of sendConsoleErrors variable --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a091447..0e96f32 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,10 @@ Place the following on your page, and replace the logglyKey value with the key p var _LTracker = _LTracker || []; _LTracker.push({ 'logglyKey': '8c518f97-e3e0-4bfb-a8ed-582d084a5289', - 'setConsoleError' : true + 'sendConsoleErrors' : true }); ``` - Usage ----- Logging text: @@ -45,3 +44,7 @@ separate logging instace: var myBetterLogger = new LogglyTracker(); myBetterLogger.push({'logglyKey': '8c518f97-e3e0-4bfb-a8ed-582d084a5289' }); // push a loggly key to initialize ``` + +Send Console Errors to Loggly +---- +Keeping sendConsolErrors value to true will send all the unhandled errors to the Loggly with the detailed information like error message, URL, line number and column number. This script also take cares of all the previously defined window.onerror functions.