logixia 1.12.3 → 1.12.5

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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # logixia
2
2
 
3
+ <p align="center">
4
+ <img src="https://raw.githubusercontent.com/Logixia/logixia/main/.github/assets/logixia-banner.png" alt="logixia: the async-first TypeScript logger. One install, every transport, never blocks the event loop." width="100%"/>
5
+ </p>
6
+
3
7
  <p align="center">
4
8
  <strong>The async-first TypeScript logger that ships complete.</strong><br/>
5
9
  Wide events &middot; OpenTelemetry (OTLP) &middot; Runtime log levels &middot; Redaction &middot; Adaptive sampling<br/>
@@ -14,6 +18,7 @@
14
18
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT"/></a>
15
19
  <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.0%2B-blue" alt="TypeScript"/></a>
16
20
  <a href="https://logixia.github.io/logixia/"><img src="https://img.shields.io/badge/website-logixia.github.io-a855f7" alt="website"/></a>
21
+ <a href="#sponsor"><img src="https://img.shields.io/badge/sponsor-%E2%99%A5-a855f7" alt="sponsor"/></a>
17
22
  </p>
18
23
 
19
24
  <p align="center">
@@ -130,6 +135,7 @@ await logger.info('Server started', { port: 3000 });
130
135
  - [CLI tool](#cli-tool)
131
136
  - [explore — Visual TUI log explorer](#explore--visual-tui-log-explorer)
132
137
  - [Configuration reference](#configuration-reference)
138
+ - [Sponsor](#sponsor)
133
139
  - [Contributing](#contributing)
134
140
  - [License](#license)
135
141
 
@@ -196,24 +202,26 @@ logixia takes a different approach: **everything ships built-in, and nothing blo
196
202
 
197
203
  ## Performance
198
204
 
199
- logixia is async-first and built for the hot path: a synchronous fast path for in-process transports (no Promise allocated when the write completes synchronously), a millisecond-cached timestamp, lazy formatting (each transport formats once — no wasted pre-format), and per-call work (level check, namespace resolution, redaction decision) served off pre-built caches. The result: logixia **beats pino on 5 of 6 real-world scenarios**, beats winston and bunyan across the board, and keeps **p99 latency at 1–3µs** with no tail spikes.
205
+ logixia is async-first and built for the hot path: a synchronous fast path for in-process transports (no Promise allocated when the write completes synchronously), a millisecond-cached timestamp, lazy formatting (each transport formats once), and per-call work (level check, namespace resolution, redaction decision) served off pre-built caches.
200
206
 
201
- Benchmarked against **pino, winston, and bunyan** — all writing to `/dev/null` (pure serialization + framework overhead, no disk/terminal cost). Node 20, Apple M-series; numbers are ops/sec, higher is better. Reproduce with `npm run benchmark`.
207
+ Every library below writes the **same JSON output** to a null sink, so this measures serialization and framework overhead, not disk or terminal speed. Node 22, Apple Silicon, ops/sec (higher is better). Reproduce with `npm run benchmark`.
202
208
 
203
- | Scenario | pino | **logixia** | winston | bunyan |
204
- | ------------------------------ | --------: | ------------: | --------: | ------: |
205
- | Simple string log | 3,220,000 | 2,769,000 | 1,577,000 | 707,000 |
206
- | **Structured log (5 fields)** | 1,319,000 | **1,536,000** | 699,000 | 536,000 |
207
- | **Error object logging** | 907,000 | **1,940,000** | 1,062,000 | 573,000 |
208
- | **Child / per-request logger** | 1,093,000 | **1,436,000** | 321,000 | 380,000 |
209
- | **Deep nested object** | 891,000 | **1,040,000** | 435,000 | 442,000 |
210
- | **High-cardinality (12 flds)** | 651,000 | **1,027,000** | 316,000 | 404,000 |
209
+ | Scenario | pino | logixia (json) | winston |
210
+ | ---------------------------- | --------: | -------------: | --------: |
211
+ | Simple string log | 3,396,000 | 1,804,000 | 1,533,000 |
212
+ | Structured log (5 fields) | 1,308,000 | 931,000 | 729,000 |
213
+ | Error object logging | 1,192,000 | 1,587,000 | 1,078,000 |
214
+ | Child / per-request logger | 1,134,000 | 892,000 | 494,000 |
215
+ | Deep nested object | 1,327,000 | 1,023,000 | 549,000 |
216
+ | High-cardinality (12 fields) | 734,000 | 525,000 | 400,000 |
211
217
 
212
218
  **What this means:**
213
219
 
214
- - ✅ **logixia is faster than pino on 5 of 6 scenarios** — including **+114% on error logging**, **+58% on high-cardinality**, **+31% on child loggers**, and **+16% on structured logs** — the shapes that dominate real production traffic.
215
- - ✅ **logixia beats winston and bunyan in every scenario**, often by 2–3×, and avoids their tail-latency spikes (winston hit **3,038µs p99** on high-cardinality and **412µs** on deep objects; logixia stays **1–3µs p99** throughout).
216
- - ⚖️ **pino still wins the trivial simple-string case** (−14%) because it writes synchronously straight to `process.stdout` — fast in a microbenchmark, but it blocks the event loop under real I/O and is exactly the path behind pino's open [flush-on-exit log-loss bug](#graceful-shutdown). logixia stays non-blocking and guarantees delivery, and pulls ahead the moment you log anything structured.
220
+ - **pino is the fastest raw JSON serializer here.** It leads in 5 of 6 scenarios, by 21–47%. If raw throughput is the only thing you need, pino is a great choice.
221
+ - **logixia is 1.2–1.9× faster than winston in every scenario**, with p99 latency of 1–5µs, against winston's 2.5–7.5µs.
222
+ - logixia is ahead on error logging, partly because pino also serializes the full stack through its error serializer.
223
+ - logixia's default human-readable console format is faster than its JSON mode. `npm run benchmark` prints both.
224
+ - The point of logixia is everything else in one package: non-blocking file and database transports, tracing, redaction, OpenTelemetry, NestJS and the CLI. It aims to be fast enough that you never notice it, without six extra installs.
217
225
 
218
226
  **Distinctive-feature throughput** (no cross-library equivalent — `npm run benchmark:features`):
219
227
 
@@ -2595,6 +2603,17 @@ interface LoggerConfig {
2595
2603
 
2596
2604
  ---
2597
2605
 
2606
+ ## Sponsor
2607
+
2608
+ logixia is free and MIT-licensed, and it is built and maintained by one person. If it saves you time, sponsoring keeps it moving:
2609
+
2610
+ - [GitHub Sponsors](https://github.com/sponsors/webcoderspeed)
2611
+ - [PayPal](https://paypal.me/Sniperspeed)
2612
+
2613
+ `npm fund logixia` prints the same links.
2614
+
2615
+ ---
2616
+
2598
2617
  ## Contributing
2599
2618
 
2600
2619
  ```bash