Refactor to default to structured logging.

- Added `flattenMessage` and `FlattenedLogMessage` to default to
  structured logging.
- Rework the logic formatting messages for the ConsoleLogger.
- Add a more comprehensive README.
This commit is contained in:
2025-01-02 17:03:52 -06:00
parent 4a9f582ad8
commit c3e2152afb
9 changed files with 351 additions and 54 deletions

12
src/util.ts Normal file
View File

@ -0,0 +1,12 @@
export function omit(
obj: Record<string, unknown>,
keys: string[],
): Record<string, unknown> {
const result: Record<string, unknown> = {};
for (const key in obj) {
if (!keys.includes(key)) {
result[key] = obj[key];
}
}
return result;
}