Skip to content

Commit 69bbfbd

Browse files
author
Roger Urscheler
committed
Upload version 1.2.8401
1 parent 0128397 commit 69bbfbd

6 files changed

+9917
-6959
lines changed

FileUpload.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module.exports = function FileUpload(config) {
5151
rejectUnauthorized: NodeSDK.rejectUnauthorized,
5252
agent: NodeSDK.proxyAgent,
5353
host: parts.hostname,
54-
port: (parts.port) ? parts.port : '443',
54+
port: parts.port ? parts.port : '443',
5555
path: parts.path,
5656
method: 'POST',
5757
headers: {

XMLHttpRequest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = function (config) {
4646

4747
this.httpReqOptions = {
4848
host: parts.hostname,
49-
port: (parts.port) ? parts.port : '443',
49+
port: parts.port ? parts.port : '443',
5050
path: parts.path,
5151
method: method,
5252
headers: {

circuit-node.js

+19-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2019 Unify Software and Solutions GmbH & Co.KG.
2+
* Copyright 2020 Unify Software and Solutions GmbH & Co.KG.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -67,16 +67,24 @@ Circuit.setLogger = function setLogger(appLogger) {
6767
var logError = appLogger.error || logWarning;
6868

6969
Circuit.logger.debug = function () {
70-
logDebug.apply(appLogger, Array.prototype.slice.apply(arguments));
70+
if (this.getLevel() <= Circuit.Enums.LogLevel.Debug) {
71+
logDebug.apply(appLogger, Array.prototype.slice.apply(arguments));
72+
}
7173
};
7274
Circuit.logger.info = function () {
73-
logInfo.apply(appLogger, Array.prototype.slice.apply(arguments));
75+
if (this.getLevel() <= Circuit.Enums.LogLevel.Info) {
76+
logInfo.apply(appLogger, Array.prototype.slice.apply(arguments));
77+
}
7478
};
7579
Circuit.logger.warning = function () {
76-
logWarning.apply(appLogger, Array.prototype.slice.apply(arguments));
80+
if (this.getLevel() <= Circuit.Enums.LogLevel.Warning) {
81+
logWarning.apply(appLogger, Array.prototype.slice.apply(arguments));
82+
}
7783
};
7884
Circuit.logger.warn = function () {
79-
logWarning.apply(appLogger, Array.prototype.slice.apply(arguments));
85+
if (this.getLevel() <= Circuit.Enums.LogLevel.Warning) {
86+
logWarning.apply(appLogger, Array.prototype.slice.apply(arguments));
87+
}
8088
};
8189
Circuit.logger.error = function (error, obj) {
8290
var args = [(error && error.stack) || error];
@@ -87,10 +95,14 @@ Circuit.setLogger = function setLogger(appLogger) {
8795
logError.apply(appLogger, args);
8896
};
8997
Circuit.logger.msgSend = function () {
90-
logInfo.apply(appLogger, Array.prototype.slice.apply(arguments));
98+
if (this.getLevel() <= Circuit.Enums.LogLevel.Debug) {
99+
logInfo.apply(appLogger, Array.prototype.slice.apply(arguments));
100+
}
91101
};
92102
Circuit.logger.msgRcvd = function () {
93-
logInfo.apply(appLogger, Array.prototype.slice.apply(arguments));
103+
if (this.getLevel() <= Circuit.Enums.LogLevel.Debug) {
104+
logInfo.apply(appLogger, Array.prototype.slice.apply(arguments));
105+
}
94106
};
95107

96108
// Set logger for use by XMLHttpRequest, WebSocket and FileUpload

0 commit comments

Comments
 (0)