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