Skip to content

Commit

Permalink
Merge pull request #11 from talis/ELE-3188-new-relic-logging-update
Browse files Browse the repository at this point in the history
ELE-3188 Make NewRelic work in addition to existing remote logging.
  • Loading branch information
pogotc authored Feb 21, 2020
2 parents 4d8390b + b230ffe commit 25f12f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app-logger-angular",
"version": "2.1.6",
"version": "2.1.7",
"main": "./js/logging.js",
"description": "Client side logging sent to the server",
"repository": {
Expand Down
6 changes: 5 additions & 1 deletion js/logging.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ loggingModule.factory(
$log.error.apply($log, arguments);
}

if (LOGGING_CONFIG.LOGGING_TYPE === 'newrelic' && $window.NREUM && $window.NREUM.noticeError) {
if (LOGGING_CONFIG.FORWARD_TO_NEWRELIC && $window.NREUM && $window.NREUM.noticeError) {
$window.NREUM.noticeError(exception);
}

Expand Down Expand Up @@ -139,6 +139,10 @@ loggingModule.factory(
}
}

if (LOGGING_CONFIG.FORWARD_TO_NEWRELIC && $window.NREUM && $window.NREUM.noticeError) {
$window.NREUM.noticeError(message, {desc: desc});
}

// check if the config says we should log to the remote, and also if a remote endpoint was specified
if (LOGGING_CONFIG.LOGGING_TYPE === 'remote' && LOGGING_CONFIG.REMOTE_LOGGING_ENDPOINT) {
// send server side
Expand Down

0 comments on commit 25f12f0

Please sign in to comment.