fix the max files count and deletion missing ?!?!, fix readme to actually have all the values for the json example, refactor file to class, fix custom not logging to file?, allow public flush
All checks were successful
Code quality checks / biome (push) Successful in 9s

This commit is contained in:
creations 2025-05-25 08:27:20 -04:00
parent 108083e0f5
commit 2c4f3cf5de
Signed by: creations
GPG key ID: 8F553AA4320FC711
6 changed files with 187 additions and 130 deletions

View file

@ -41,13 +41,14 @@ function getCallerInfo(config: Required<LoggerConfig>): {
} {
const id = generateShortId();
const timestampInfo = getTimestamp(config);
const fallback = {
id: id,
id,
fileName: "unknown",
line: "0",
timestamp: getTimestamp(config).timestamp,
prettyTimestamp: getTimestamp(config).prettyTimestamp,
column: "0",
timestamp: timestampInfo.timestamp,
prettyTimestamp: timestampInfo.prettyTimestamp,
};
const stack = new Error().stack;
@ -73,8 +74,8 @@ function getCallerInfo(config: Required<LoggerConfig>): {
fileName: basename(fullPath),
line: lineNumber,
column: columnNumber,
timestamp: getTimestamp(config).timestamp,
prettyTimestamp: getTimestamp(config).prettyTimestamp,
timestamp: timestampInfo.timestamp,
prettyTimestamp: timestampInfo.prettyTimestamp,
};
}
@ -97,8 +98,8 @@ function getCallerInfo(config: Required<LoggerConfig>): {
fileName: basename(fullPath),
line: lineNumber,
column: columnNumber,
timestamp: getTimestamp(config).timestamp,
prettyTimestamp: getTimestamp(config).prettyTimestamp,
timestamp: timestampInfo.timestamp,
prettyTimestamp: timestampInfo.prettyTimestamp,
};
}
}