Commit Graph

9 Commits

Author SHA1 Message Date
jdb 642078e728 Fix all sources to comply with eslint rules introduced in 2.0.0 (no logic changes). 2026-01-09 19:19:15 -06:00
jdb 4ddeeab228 Clarify documentation for flattenMessage. 2025-12-15 12:26:09 -06:00
jdb f33ca24b53 timestamp -> ts; error -> err 2025-07-14 15:38:40 -05:00
jdb ef2b0ed750 Change the naming convention for LogMessage internal message field. 2025-06-26 10:44:57 -05:00
jdb 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
jdb 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
jdb b2d1b71a52 Remove erroneously committed test code. 2021-07-23 00:15:32 -05:00
jdb 6562948acb Add convenience method for parsing LogLevel values form string. 2021-07-23 00:00:41 -05:00
jdb 1a96000e81 Initial 1.0.0 commit (library extracted from existing project). 2020-08-07 08:54:06 -05:00