@loggerjs/pretty 0.5.6 → 0.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/README.md +8 -13
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://jskits.github.io/loggerjs/"><img src="https://raw.githubusercontent.com/jskits/loggerjs/main/docs/public/logo.png" alt="LoggerJS logo" width="64" height="64" /></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# @loggerjs/pretty
|
|
2
6
|
|
|
3
7
|
Pretty display transports and formatters for LoggerJS.
|
|
4
8
|
|
|
5
|
-
This package is for local developer experience: browser DevTools, Node
|
|
6
|
-
terminals, and custom debug sinks. Production delivery should still prefer
|
|
7
|
-
structured transports such as `stdoutTransport()`, `fileTransport()`,
|
|
8
|
-
`browserHttpTransport()`, OTLP, Loki, Datadog, or another machine-readable
|
|
9
|
-
destination.
|
|
9
|
+
This package is for local developer experience: browser DevTools, Node terminals, and custom debug sinks. Production delivery should still prefer structured transports such as `stdoutTransport()`, `fileTransport()`, `browserHttpTransport()`, OTLP, Loki, Datadog, or another machine-readable destination.
|
|
10
10
|
|
|
11
11
|
## Browser / Console
|
|
12
12
|
|
|
@@ -25,8 +25,7 @@ const logger = createLogger({
|
|
|
25
25
|
});
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
`prettyConsoleTransport()` writes through the unpatched console registry, so it
|
|
29
|
-
can run beside `captureConsoleIntegration()` without feedback loops.
|
|
28
|
+
`prettyConsoleTransport()` writes through the unpatched console registry, so it can run beside `captureConsoleIntegration()` without feedback loops.
|
|
30
29
|
|
|
31
30
|
## Node Terminal
|
|
32
31
|
|
|
@@ -45,10 +44,7 @@ const logger = createLogger({
|
|
|
45
44
|
});
|
|
46
45
|
```
|
|
47
46
|
|
|
48
|
-
`prettyStdoutTransport()` and `prettyStderrTransport()` use ANSI colors when the
|
|
49
|
-
target stream is a TTY. They honor `NO_COLOR` and `FORCE_COLOR`, and their
|
|
50
|
-
`flush()` waits for `drain` when the stream reports backpressure. Use these for
|
|
51
|
-
local development; keep `stdoutTransport()` for production NDJSON.
|
|
47
|
+
`prettyStdoutTransport()` and `prettyStderrTransport()` use ANSI colors when the target stream is a TTY. They honor `NO_COLOR` and `FORCE_COLOR`, and their `flush()` waits for `drain` when the stream reports backpressure. Use these for local development; keep `stdoutTransport()` for production NDJSON.
|
|
52
48
|
|
|
53
49
|
## Formatter
|
|
54
50
|
|
|
@@ -59,5 +55,4 @@ const rendered = formatPrettyEvent(event, { mode: "expanded", colors: "never" })
|
|
|
59
55
|
console.log(rendered.text);
|
|
60
56
|
```
|
|
61
57
|
|
|
62
|
-
The formatter returns plain text, ANSI text, browser console arguments, and raw
|
|
63
|
-
detail values so custom transports can preserve inspectable objects.
|
|
58
|
+
The formatter returns plain text, ANSI text, browser console arguments, and raw detail values so custom transports can preserve inspectable objects.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loggerjs/pretty",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Pretty console and terminal output helpers for loggerjs.",
|
|
5
5
|
"homepage": "https://github.com/jskits/loggerjs/tree/main/packages/pretty#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"provenance": true
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@loggerjs/core": "0.
|
|
52
|
+
"@loggerjs/core": "0.6.0"
|
|
53
53
|
},
|
|
54
54
|
"loggerjsSubpathEntries": {
|
|
55
55
|
"formatter": "src/formatter.ts",
|