@putkoff/abstract-logger 0.0.29 → 0.0.30
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/dist/cjs/index.js +13 -15
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +13 -15
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -14468,20 +14468,21 @@ const IS_BROWSER = typeof window !== "undefined" &&
|
|
|
14468
14468
|
const IS_NODE = typeof process !== "undefined" &&
|
|
14469
14469
|
process.release?.name === "node";
|
|
14470
14470
|
|
|
14471
|
-
function parseList(value) {
|
|
14472
|
-
return value
|
|
14473
|
-
? value.split(",").map(s => s.trim()).filter(Boolean)
|
|
14474
|
-
: [];
|
|
14475
|
-
}
|
|
14476
14471
|
function getLogConfig() {
|
|
14477
14472
|
return {
|
|
14478
14473
|
condensed: process.env.LOG_CONDENSED !== "false",
|
|
14479
14474
|
expandOnDebug: process.env.LOG_EXPAND_DEBUG !== "false",
|
|
14480
14475
|
showDetails: process.env.LOG_SHOW_DETAILS !== "false",
|
|
14481
14476
|
maxDetailsLength: Number(process.env.LOG_DETAILS_MAX ?? 500),
|
|
14482
|
-
showDetailslist:
|
|
14483
|
-
|
|
14484
|
-
|
|
14477
|
+
showDetailslist: process.env.LOG_DETAILS_ALLOWLIST
|
|
14478
|
+
? process.env.LOG_DETAILS_ALLOWLIST.split(",").map(s => s.trim())
|
|
14479
|
+
: [],
|
|
14480
|
+
functionAllowlist: process.env.LOG_FUNCTION_ALLOWLIST
|
|
14481
|
+
? process.env.LOG_FUNCTION_ALLOWLIST.split(",").map(s => s.trim())
|
|
14482
|
+
: [],
|
|
14483
|
+
functionBlocklist: process.env.LOG_FUNCTION_BLOCKLIST
|
|
14484
|
+
? process.env.LOG_FUNCTION_BLOCKLIST.split(",").map(s => s.trim())
|
|
14485
|
+
: [],
|
|
14485
14486
|
};
|
|
14486
14487
|
}
|
|
14487
14488
|
|
|
@@ -14511,14 +14512,11 @@ function shouldCondense(logType) {
|
|
|
14511
14512
|
return LOG_CONFIG.condensed;
|
|
14512
14513
|
}
|
|
14513
14514
|
function shouldShowDetails(logType) {
|
|
14514
|
-
const
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
if (allow.length > 0) {
|
|
14518
|
-
return allow.includes(logType);
|
|
14515
|
+
const cfg = getLogConfig();
|
|
14516
|
+
if (cfg.showDetailslist.length > 0) {
|
|
14517
|
+
return cfg.showDetailslist.includes(logType);
|
|
14519
14518
|
}
|
|
14520
|
-
|
|
14521
|
-
return LOG_CONFIG.showDetails;
|
|
14519
|
+
return cfg.showDetails;
|
|
14522
14520
|
}
|
|
14523
14521
|
/** Exported logger */
|
|
14524
14522
|
const logger = nodeLogger;
|