16 Commits

Author SHA1 Message Date
f21cce9944 Update eslint config. 2.0.0 2025-01-07 09:40:09 -06:00
a89a41520c ConsoleLogAppender writes a human-readable summary when logging structured data.
Taking advantage of the new LogMessageFormatter return type, the
ConsoleLogAppender logs the formatted message as-is if it is a string,
but when processing structured data inserts a string summary consisting
of the message level, scope, and message summary or method. The full
object is still logged to the console as well for inspection.
2025-01-07 09:30:21 -06:00
6b4173d636 .gitignore for built packages created with npm pack 2025-01-07 08:53:25 -06:00
756ebf3c78 Allow LogMessageFormatter to return FlattenedLogMessages.
Originally the idea was that a log formatter should turn the LogMessage
into a string that can be appended via a LogAppender. However, all of
the default LogAppenders can handle objects. In particular, the
ConsoleLogAppender writes to the browser console which offers an
interactive UI experience when logging raw objects.

For LogAppenders that can only manage text, it seems an acceptable
design decision to require users to provide a LogMessageFormatter that
returns a string, or accept some sane default like JSON.stringify if
their formatter returns objects.
2025-01-07 08:48:37 -06:00
13941840ce Move back to npm (bun does not package correctly). 2025-01-02 22:53:10 -06:00
c3e2152afb 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.
2025-01-02 22:50:10 -06:00
4a9f582ad8 Migrate to bun and eslint. 2025-01-02 17:01:39 -06:00
8418b242c3 Replace Axios with fetch API. 1.1.5 2023-05-29 19:20:12 -05:00
f0944d0d7e Update Axios for security fixes. 1.1.4 2023-05-29 19:03:55 -05:00
f75edbc22a Fix NPM packaging. 1.1.3 2021-08-16 23:03:57 -05:00
b2d1b71a52 Remove erroneously committed test code. 1.1.2 2021-07-23 00:15:32 -05:00
c8ed8b61da Bump version to republish with built artifacts. 1.1.1 2021-07-23 00:12:23 -05:00
6562948acb Add convenience method for parsing LogLevel values form string. 1.1.0 2021-07-23 00:00:41 -05:00
e42549773d Rename package to avoid conflict with existing modules. 1.0.0 2020-08-07 09:19:03 -05:00
73e8b0726c Fix package.json module definition. 2020-08-07 09:07:16 -05:00
1a96000e81 Initial 1.0.0 commit (library extracted from existing project). 2020-08-07 08:54:06 -05:00