Skip to content

Commit 83745d7

Browse files
committed
Merge pull request #7 from talis/PassOverrideThreshold
90% - If overriding logging threshold pass it back to remote logging URL.
2 parents 8286727 + c61676d commit 83745d7

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.1.1 (2016-02-24)
2+
3+
Bug fix:
4+
5+
- If overriding the logging threshold dynamically, also pass this value back to the remote logging URL.
6+
17
## 2.1.0 (2016-02-23)
28

39
Features:

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.0",
3+
"version": "2.1.1",
44
"main": "./js/logging.js",
55
"description": "Client side logging sent to the server",
66
"repository": {

js/logging.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ loggingModule.factory(
9494
var loggingThreshold = LOGGING_CONFIG.LOGGING_THRESHOLD || 'info';
9595
var iLoggingThreshold = arrLoggingLevels.indexOf(loggingThreshold);
9696

97+
/*
98+
* If we've told applicationLoggingService to override the logging threshold set in config then also pass
99+
* it back to the remote client logging URL.
100+
*/
101+
var overrideLoggingThreshold = false;
102+
97103
var isLoggingEnabledForSeverity = function(severity) {
98104
var iRequestedLevel = arrLoggingLevels.indexOf(severity);
99105
if (iRequestedLevel === -1) {
@@ -131,7 +137,8 @@ loggingModule.factory(
131137
type: severity,
132138
url: $window.location.href,
133139
message: message,
134-
desc: desc
140+
desc: desc,
141+
overrideLoggingThreshold: overrideLoggingThreshold
135142
})
136143
});
137144
}
@@ -161,6 +168,7 @@ loggingModule.factory(
161168
*/
162169
if (arrLoggingLevels.indexOf(level) !== -1) {
163170
iLoggingThreshold = arrLoggingLevels.indexOf(level);
171+
overrideLoggingThreshold = true;
164172
}
165173
}
166174
});

0 commit comments

Comments
 (0)