From ffe2b403530ffb6260174d591f99624815273b1e Mon Sep 17 00:00:00 2001 From: Jayant Varshney Date: Mon, 2 Mar 2015 19:08:29 +0530 Subject: [PATCH 1/2] Removed tag support Sending tags for now causing console warnings for MIME type. --- src/loggly.tracker.js | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/loggly.tracker.js b/src/loggly.tracker.js index e096774..3b0bb1d 100644 --- a/src/loggly.tracker.js +++ b/src/loggly.tracker.js @@ -15,9 +15,8 @@ function LogglyTracker() { this.key = false; - this.sendConsoleErrors = false; - this.tag = 'jslogger'; - } + this.sendConsoleErrors = false; + } function setKey(tracker, key) { tracker.key = key; @@ -49,17 +48,12 @@ } } - function setTag(tracker, tag){ - tracker.tag = tag; - } - function setInputUrl(tracker) { tracker.inputUrl = LOGGLY_INPUT_PREFIX + (tracker.logglyCollectorDomain || LOGGLY_COLLECTOR_DOMAIN) + '/inputs/' + tracker.key - + '/tag/'+tracker.tag+'/' - + LOGGLY_INPUT_SUFFIX; + + LOGGLY_INPUT_SUFFIX; } LogglyTracker.prototype = { @@ -95,15 +89,11 @@ return; } - if(data.sendConsoleErrors !== undefined) { - setSendConsoleError(self, data.sendConsoleErrors); - } + if(data.sendConsoleErrors !== undefined) { + setSendConsoleError(self, data.sendConsoleErrors); + } - if(data.tag){ - setTag(self, data.tag); - } - - if(data.logglyKey) { + if(data.logglyKey) { setKey(self, data.logglyKey); return; } @@ -128,7 +118,7 @@ try { var im = new Image(), - q = 'PLAINTEXT=' + encodeURIComponent(JSON.stringify(data)); + q = 'PLAINTEXT=' + encodeURIComponent(JSON.stringify(data)); im.src = this.inputUrl + q; } catch (ex) { if (window && window.console && typeof window.console.log === 'function') { From 5a0ba38683d7becaa5869911155b5f9b8b833659 Mon Sep 17 00:00:00 2001 From: psquickitjayant Date: Mon, 2 Mar 2015 19:26:49 +0530 Subject: [PATCH 2/2] Removed info about Tag --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index bdbc8a2..89f7ef9 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ Place the following on your page, and replace the logglyKey value with the key p _LTracker.push({ 'logglyKey': '8c518f97-e3e0-4bfb-a8ed-582d084a5289', 'sendConsoleErrors' : true, - 'tag' : 'jslogger' }); ```