@putkoff/abstract-logger 0.0.33 → 0.0.35
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 +2 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +2 -7
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -14548,12 +14548,8 @@ function resolveValue(...values) {
|
|
|
14548
14548
|
function padRight(str, width) {
|
|
14549
14549
|
return str.length >= width ? str : str + " ".repeat(width - str.length);
|
|
14550
14550
|
}
|
|
14551
|
-
function padLeft(str, width) {
|
|
14552
|
-
return str.length >= width ? str : " ".repeat(width - str.length) + str;
|
|
14553
|
-
}
|
|
14554
14551
|
const COLS = {
|
|
14555
14552
|
timestamp: 24,
|
|
14556
|
-
function: 28,
|
|
14557
14553
|
file: 16,
|
|
14558
14554
|
};
|
|
14559
14555
|
/* ------------------------------------------------------------------ */
|
|
@@ -14759,13 +14755,12 @@ function getLogString(messageOrOptions, logType = null, details = null, function
|
|
|
14759
14755
|
}
|
|
14760
14756
|
const emojiCol = padRight(emoji, 3);
|
|
14761
14757
|
const ts = padRight(timestamp, COLS.timestamp);
|
|
14762
|
-
const fn =
|
|
14763
|
-
const fileName =
|
|
14758
|
+
const fn = resolvedFunctionName;
|
|
14759
|
+
const fileName = padRight(resolvedFileLocation.trim(), COLS.file);
|
|
14764
14760
|
let line = `${emojiCol}` +
|
|
14765
14761
|
`[${ts}] ` +
|
|
14766
14762
|
`[${fn}] ` +
|
|
14767
14763
|
`${message}`;
|
|
14768
|
-
// ---------------- Details serialization ----------------
|
|
14769
14764
|
if (showDetails && resolvedDetails !== null && resolvedDetails !== undefined) {
|
|
14770
14765
|
const LOG_CONFIG = getLogConfig();
|
|
14771
14766
|
const serialized = serializeDetails(resolvedDetails, condense, LOG_CONFIG.maxDetailsLength);
|