ag-common 0.0.399 → 0.0.400
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.
|
@@ -11,7 +11,7 @@ const SetLogShim = (ls) => {
|
|
|
11
11
|
logShim = ls;
|
|
12
12
|
};
|
|
13
13
|
exports.SetLogShim = SetLogShim;
|
|
14
|
-
let userLogLevel
|
|
14
|
+
let userLogLevel;
|
|
15
15
|
const SetLogLevel = (l) => {
|
|
16
16
|
const lu = l === null || l === void 0 ? void 0 : l.toUpperCase();
|
|
17
17
|
if ((0, exports.GetLogLevel)(lu) === -1) {
|
|
@@ -20,9 +20,11 @@ const SetLogLevel = (l) => {
|
|
|
20
20
|
userLogLevel = lu;
|
|
21
21
|
};
|
|
22
22
|
exports.SetLogLevel = SetLogLevel;
|
|
23
|
-
(0, exports.SetLogLevel)(process.env.LOG_LEVEL);
|
|
24
23
|
function logprocess(type, args) {
|
|
25
|
-
|
|
24
|
+
if (!userLogLevel) {
|
|
25
|
+
(0, exports.SetLogLevel)(process.env.LOG_LEVEL);
|
|
26
|
+
}
|
|
27
|
+
const min = (0, exports.GetLogLevel)(userLogLevel || 'WARN');
|
|
26
28
|
const typesLogLevel = (0, exports.GetLogLevel)(type);
|
|
27
29
|
// env ignores it
|
|
28
30
|
if (typesLogLevel < min) {
|