Skip to content

Commit 25f12f0

Browse files
authored
Merge pull request #11 from talis/ELE-3188-new-relic-logging-update
ELE-3188 Make NewRelic work in addition to existing remote logging.
2 parents 4d8390b + b230ffe commit 25f12f0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "app-logger-angular",
3-
"version": "2.1.6",
3+
"version": "2.1.7",
44
"main": "./js/logging.js",
55
"description": "Client side logging sent to the server",
66
"repository": {

js/logging.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ loggingModule.factory(
4949
$log.error.apply($log, arguments);
5050
}
5151

52-
if (LOGGING_CONFIG.LOGGING_TYPE === 'newrelic' && $window.NREUM && $window.NREUM.noticeError) {
52+
if (LOGGING_CONFIG.FORWARD_TO_NEWRELIC && $window.NREUM && $window.NREUM.noticeError) {
5353
$window.NREUM.noticeError(exception);
5454
}
5555

@@ -139,6 +139,10 @@ loggingModule.factory(
139139
}
140140
}
141141

142+
if (LOGGING_CONFIG.FORWARD_TO_NEWRELIC && $window.NREUM && $window.NREUM.noticeError) {
143+
$window.NREUM.noticeError(message, {desc: desc});
144+
}
145+
142146
// check if the config says we should log to the remote, and also if a remote endpoint was specified
143147
if (LOGGING_CONFIG.LOGGING_TYPE === 'remote' && LOGGING_CONFIG.REMOTE_LOGGING_ENDPOINT) {
144148
// send server side

0 commit comments

Comments
 (0)