@warlock.js/logger 4.4.0 → 4.6.0
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/CHANGELOG.md +11 -15
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -14,42 +14,38 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
14
14
|
|
|
15
15
|
### Changed
|
|
16
16
|
|
|
17
|
-
- `ConsoleLog`'s timestamp (and the `↳` context arrow) switch from bright-black `gray` to the 256-color
|
|
17
|
+
- `ConsoleLog`'s timestamp (and the `↳` context arrow) switch from bright-black `gray` to the 256-color `slate` — recessive but cleanly legible where bright-black read muddy.
|
|
18
18
|
|
|
19
19
|
## 4.2.9
|
|
20
20
|
|
|
21
21
|
### Changed
|
|
22
22
|
|
|
23
|
-
- `ConsoleLog` output
|
|
24
|
-
- **Time-only timestamp** (`HH:mm:ss.SSS`) instead of the full ISO string — within a dev session the date is just noise. Persistent channels (`FileLog` / `JSONFileLog`) still record the full ISO timestamp.
|
|
25
|
-
- The timestamp moves from yellow to **gray** so the colored level + message lead the eye; `module` (cyan) and `action` (magenta) keep their colors for at-a-glance subsystem scanning.
|
|
26
|
-
- **Aligned columns** — each level tag is padded to a fixed width so the timestamp / module / action columns line up vertically across a stream of logs.
|
|
27
|
-
- **`fatal` is restored to a background badge** — white, bold text on a bright-red background (`☠ fatal`), the same column width as the other tags but deliberately louder than `error`'s plain red, so an unrecoverable failure can't be missed (4.2.8 had briefly flattened it to a plain label).
|
|
23
|
+
- `ConsoleLog` output retuned for scannability — a time-only `HH:mm:ss.SSS` timestamp dimmed to gray, fixed-width level tags so the columns align, and `fatal` restored to a white-on-bright-red background badge. (`FileLog` / `JSONFileLog` keep the full ISO timestamp.)
|
|
28
24
|
|
|
29
25
|
## 4.2.8
|
|
30
26
|
|
|
31
27
|
### Changed
|
|
32
28
|
|
|
33
|
-
- `ConsoleLog` now prints
|
|
29
|
+
- `ConsoleLog` now prints each level's name beside its icon (`⚙ debug`, `ℹ info`, `⚠ warn`, `✗ error`, `✓ success`, `☠ fatal`) for at-a-glance reading.
|
|
34
30
|
|
|
35
31
|
## 4.2.0
|
|
36
32
|
|
|
37
33
|
### Added
|
|
38
34
|
|
|
39
|
-
- `log.flush()` — awaitable async counterpart to `flushSync()
|
|
40
|
-
- `SentryLog` channel — forwards entries to Sentry
|
|
41
|
-
- `log.fatal()` + `fatal`
|
|
42
|
-
- `ConsoleLog` renders `fatal` with a `☠` icon on a bright-red background
|
|
35
|
+
- `log.flush()` — awaitable async counterpart to `flushSync()`, draining every channel via `Promise.allSettled` with per-channel isolation. Implemented by `FileLog` / `JSONFileLog`.
|
|
36
|
+
- `SentryLog` channel — forwards entries to Sentry (`eventLevels` become events, others breadcrumbs; `module` / `action` as tags). `@sentry/node` is an optional, lazily-imported peer.
|
|
37
|
+
- `log.fatal()` + `fatal` level — ranked strictly above `error` for unrecoverable failures; does not auto-flush or exit.
|
|
38
|
+
- `ConsoleLog` renders `fatal` with a `☠` icon on a bright-red background, distinct from `error`'s `✗`.
|
|
43
39
|
|
|
44
40
|
### Changed
|
|
45
41
|
|
|
46
|
-
- `captureAnyUnhandledRejection()` now escalates `uncaughtException` to `log.fatal` (was `
|
|
47
|
-
- `LoggingData.type` is now typed as `LogLevel` (was a duplicated inline union
|
|
48
|
-
- `LogContract`
|
|
42
|
+
- `captureAnyUnhandledRejection()` now escalates `uncaughtException` to `log.fatal` (was `error`); `unhandledRejection` stays at `error`.
|
|
43
|
+
- `LoggingData.type` is now typed as `LogLevel` (was a duplicated inline union).
|
|
44
|
+
- `LogContract` / `LogChannel` now expose an optional `flush?()` alongside `flushSync?()`.
|
|
49
45
|
|
|
50
46
|
### Fixed
|
|
51
47
|
|
|
52
|
-
- `@sentry/node` is
|
|
48
|
+
- `@sentry/node` is referenced only via local types + an indirect dynamic import, so source-served consumers no longer get `TS2307: Cannot find module '@sentry/node'` when they don't install the optional peer.
|
|
53
49
|
|
|
54
50
|
## 4.1.15
|
|
55
51
|
|
package/package.json
CHANGED
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@mongez/copper": "^2.1.2",
|
|
19
19
|
"@mongez/reinforcements": "^3.3.0",
|
|
20
|
-
"@warlock.js/fs": "4.
|
|
20
|
+
"@warlock.js/fs": "4.6.0",
|
|
21
21
|
"dayjs": "^1.11.9",
|
|
22
22
|
"safe-stable-stringify": "^2.5.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@sentry/node": "^8.0.0 || ^9.0.0 || ^10.0.0"
|
|
26
26
|
},
|
|
27
|
-
"version": "4.
|
|
27
|
+
"version": "4.6.0",
|
|
28
28
|
"main": "./cjs/index.cjs",
|
|
29
29
|
"module": "./esm/index.mjs",
|
|
30
30
|
"types": "./esm/index.d.mts",
|