@putkoff/abstract-logger 0.0.29 โ 0.0.31
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 +84 -22
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +84 -22
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -14470,20 +14470,21 @@ const IS_BROWSER = typeof window !== "undefined" &&
|
|
|
14470
14470
|
const IS_NODE = typeof process !== "undefined" &&
|
|
14471
14471
|
process.release?.name === "node";
|
|
14472
14472
|
|
|
14473
|
-
function parseList(value) {
|
|
14474
|
-
return value
|
|
14475
|
-
? value.split(",").map(s => s.trim()).filter(Boolean)
|
|
14476
|
-
: [];
|
|
14477
|
-
}
|
|
14478
14473
|
function getLogConfig() {
|
|
14479
14474
|
return {
|
|
14480
14475
|
condensed: process.env.LOG_CONDENSED !== "false",
|
|
14481
14476
|
expandOnDebug: process.env.LOG_EXPAND_DEBUG !== "false",
|
|
14482
14477
|
showDetails: process.env.LOG_SHOW_DETAILS !== "false",
|
|
14483
14478
|
maxDetailsLength: Number(process.env.LOG_DETAILS_MAX ?? 500),
|
|
14484
|
-
showDetailslist:
|
|
14485
|
-
|
|
14486
|
-
|
|
14479
|
+
showDetailslist: process.env.LOG_DETAILS_ALLOWLIST
|
|
14480
|
+
? process.env.LOG_DETAILS_ALLOWLIST.split(",").map(s => s.trim())
|
|
14481
|
+
: [],
|
|
14482
|
+
functionAllowlist: process.env.LOG_FUNCTION_ALLOWLIST
|
|
14483
|
+
? process.env.LOG_FUNCTION_ALLOWLIST.split(",").map(s => s.trim())
|
|
14484
|
+
: [],
|
|
14485
|
+
functionBlocklist: process.env.LOG_FUNCTION_BLOCKLIST
|
|
14486
|
+
? process.env.LOG_FUNCTION_BLOCKLIST.split(",").map(s => s.trim())
|
|
14487
|
+
: [],
|
|
14487
14488
|
};
|
|
14488
14489
|
}
|
|
14489
14490
|
|
|
@@ -14513,14 +14514,11 @@ function shouldCondense(logType) {
|
|
|
14513
14514
|
return LOG_CONFIG.condensed;
|
|
14514
14515
|
}
|
|
14515
14516
|
function shouldShowDetails(logType) {
|
|
14516
|
-
const
|
|
14517
|
-
|
|
14518
|
-
|
|
14519
|
-
if (allow.length > 0) {
|
|
14520
|
-
return allow.includes(logType);
|
|
14517
|
+
const cfg = getLogConfig();
|
|
14518
|
+
if (cfg.showDetailslist.length > 0) {
|
|
14519
|
+
return cfg.showDetailslist.includes(logType);
|
|
14521
14520
|
}
|
|
14522
|
-
|
|
14523
|
-
return LOG_CONFIG.showDetails;
|
|
14521
|
+
return cfg.showDetails;
|
|
14524
14522
|
}
|
|
14525
14523
|
/** Exported logger */
|
|
14526
14524
|
const logger = nodeLogger;
|
|
@@ -14662,19 +14660,83 @@ function getLogString(messageOrOptions, logType = null, details = null, function
|
|
|
14662
14660
|
resolvedFileLocation = resolveValue(file, resolvedFileLocation);
|
|
14663
14661
|
}
|
|
14664
14662
|
const emojiMap = {
|
|
14663
|
+
emitting: "๐ค",
|
|
14664
|
+
ingesting: "๐ฅ",
|
|
14665
|
+
streaming: "๐",
|
|
14666
|
+
forwarding: "โก๏ธ",
|
|
14667
|
+
receiving: "๐ก",
|
|
14668
|
+
relaying: "๐",
|
|
14669
|
+
syncing: "๐",
|
|
14670
|
+
buffering: "โณ",
|
|
14671
|
+
batching: "๐ฆ",
|
|
14672
|
+
dispatching: "๐",
|
|
14673
|
+
settings: "โ๏ธ",
|
|
14674
|
+
computing: "๐ง ",
|
|
14675
|
+
running: "๐",
|
|
14676
|
+
working: "๐ง",
|
|
14677
|
+
building: "๐๏ธ",
|
|
14678
|
+
compiling: "๐งฉ",
|
|
14679
|
+
crunching: "๐งฎ",
|
|
14680
|
+
optimizing: "๐",
|
|
14681
|
+
queued: "๐",
|
|
14682
|
+
waiting: "โณ",
|
|
14683
|
+
active: "โถ๏ธ",
|
|
14684
|
+
paused: "โธ๏ธ",
|
|
14685
|
+
sleeping: "๐ค",
|
|
14686
|
+
resumed: "๐",
|
|
14687
|
+
completed: "โ
",
|
|
14688
|
+
cancelled: "โ",
|
|
14689
|
+
expired: "โ",
|
|
14690
|
+
warning: "โ ๏ธ",
|
|
14691
|
+
error: "โ",
|
|
14692
|
+
critical: "๐จ",
|
|
14693
|
+
retrying: "๐",
|
|
14694
|
+
skipped: "โญ๏ธ",
|
|
14695
|
+
fallback: "๐",
|
|
14696
|
+
degraded: "๐",
|
|
14697
|
+
saved: "๐พ",
|
|
14698
|
+
loading: "๐",
|
|
14699
|
+
exporting: "๐ค",
|
|
14700
|
+
importing: "๐ฅ",
|
|
14701
|
+
archived: "๐๏ธ",
|
|
14702
|
+
deleted: "๐๏ธ",
|
|
14703
|
+
cached: "๐ง",
|
|
14704
|
+
persisted: "๐",
|
|
14705
|
+
locked: "๐",
|
|
14706
|
+
unlocked: "๐",
|
|
14707
|
+
secure: "๐ก๏ธ",
|
|
14708
|
+
insecure: "โ ๏ธ",
|
|
14709
|
+
verified: "โ๏ธ",
|
|
14710
|
+
blocked: "โ",
|
|
14711
|
+
allowed: "๐ข",
|
|
14712
|
+
connected: "๐",
|
|
14713
|
+
disconnected: "โ",
|
|
14714
|
+
online: "๐ข",
|
|
14715
|
+
offline: "๐ด",
|
|
14716
|
+
latency: "๐ถ",
|
|
14717
|
+
proxying: "๐งญ",
|
|
14718
|
+
broadcasting: "๐ฃ",
|
|
14719
|
+
thinking: "๐ค",
|
|
14720
|
+
learning: "๐ง ",
|
|
14721
|
+
predicting: "๐ฎ",
|
|
14722
|
+
scanning: "๐",
|
|
14723
|
+
crawling: "๐ท๏ธ",
|
|
14724
|
+
responding: "๐ฌ",
|
|
14725
|
+
generating: "โจ",
|
|
14726
|
+
debug: "๐",
|
|
14727
|
+
trace: "๐งต",
|
|
14728
|
+
inspect: "๐",
|
|
14729
|
+
test: "๐งช",
|
|
14730
|
+
mock: "๐ญ",
|
|
14731
|
+
sandbox: "๐๏ธ",
|
|
14732
|
+
experiment: "โ๏ธ",
|
|
14665
14733
|
success: "โ
",
|
|
14666
14734
|
processing: "๐",
|
|
14667
14735
|
listening: "๐ก",
|
|
14668
|
-
computing: "๐ง ",
|
|
14669
|
-
waiting: "โณ",
|
|
14670
|
-
emitting: "๐ค",
|
|
14671
|
-
ingesting: "๐ฅ",
|
|
14672
14736
|
prune: "๐งน",
|
|
14673
14737
|
connect: "๐",
|
|
14674
14738
|
info: "โน๏ธ",
|
|
14675
|
-
warn: "โ ๏ธ"
|
|
14676
|
-
error: "โ",
|
|
14677
|
-
debug: "๐",
|
|
14739
|
+
warn: "โ ๏ธ"
|
|
14678
14740
|
};
|
|
14679
14741
|
const finalLogType = resolvedLogType ?? "info";
|
|
14680
14742
|
const emoji = emojiMap[finalLogType] ?? "โน๏ธ";
|