@alicloud/alfa-core 1.5.0-alpha.8 → 1.5.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/utils/logger.js +5 -0
- package/lib/utils/logger.js +5 -0
- package/package.json +1 -1
package/es/utils/logger.js
CHANGED
|
@@ -75,6 +75,11 @@ var Logger = /*#__PURE__*/function () {
|
|
|
75
75
|
value: function track(method, topic, params) {
|
|
76
76
|
var data = this.mergeData(params);
|
|
77
77
|
|
|
78
|
+
// just report in aliyun.com && alibabacloud.com
|
|
79
|
+
if (!['aliyun.com', 'alibabacloud.com', 'aliyun-inc.com', 'alibaba-inc.com'].find(function (domain) {
|
|
80
|
+
return location.hostname.endsWith(domain);
|
|
81
|
+
})) return false;
|
|
82
|
+
|
|
78
83
|
// do not track during development
|
|
79
84
|
if (this.context.ENV !== 'prod') {
|
|
80
85
|
console[method](topic, data);
|
package/lib/utils/logger.js
CHANGED
|
@@ -82,6 +82,11 @@ var Logger = exports.default = /*#__PURE__*/function () {
|
|
|
82
82
|
value: function track(method, topic, params) {
|
|
83
83
|
var data = this.mergeData(params);
|
|
84
84
|
|
|
85
|
+
// just report in aliyun.com && alibabacloud.com
|
|
86
|
+
if (!['aliyun.com', 'alibabacloud.com', 'aliyun-inc.com', 'alibaba-inc.com'].find(function (domain) {
|
|
87
|
+
return location.hostname.endsWith(domain);
|
|
88
|
+
})) return false;
|
|
89
|
+
|
|
85
90
|
// do not track during development
|
|
86
91
|
if (this.context.ENV !== 'prod') {
|
|
87
92
|
console[method](topic, data);
|