@putkoff/abstract-logger 0.0.32 → 0.0.34
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 +4 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +4 -7
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -14548,9 +14548,6 @@ 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
14553
|
function: 28,
|
|
@@ -14757,14 +14754,14 @@ function getLogString(messageOrOptions, logType = null, details = null, function
|
|
|
14757
14754
|
if (condense) {
|
|
14758
14755
|
resolvedFileLocation = resolvedFileLocation.split("/").pop();
|
|
14759
14756
|
}
|
|
14757
|
+
const emojiCol = padRight(emoji, 3);
|
|
14760
14758
|
const ts = padRight(timestamp, COLS.timestamp);
|
|
14761
|
-
const fn = padRight(resolvedFunctionName, COLS.function);
|
|
14762
|
-
const fileName =
|
|
14763
|
-
let line = `${
|
|
14759
|
+
const fn = padRight(resolvedFunctionName.trim(), COLS.function);
|
|
14760
|
+
const fileName = padRight(resolvedFileLocation.trim(), COLS.file);
|
|
14761
|
+
let line = `${emojiCol}` +
|
|
14764
14762
|
`[${ts}] ` +
|
|
14765
14763
|
`[${fn}] ` +
|
|
14766
14764
|
`${message}`;
|
|
14767
|
-
// ---------------- Details serialization ----------------
|
|
14768
14765
|
if (showDetails && resolvedDetails !== null && resolvedDetails !== undefined) {
|
|
14769
14766
|
const LOG_CONFIG = getLogConfig();
|
|
14770
14767
|
const serialized = serializeDetails(resolvedDetails, condense, LOG_CONFIG.maxDetailsLength);
|