syntropylog 0.8.13 → 0.8.15
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 +33 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
<a href="https://github.com/Syntropysoft/SyntropyLog/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/syntropylog.svg" alt="License"></a>
|
|
18
18
|
<a href="https://github.com/Syntropysoft/SyntropyLog/actions/workflows/ci.yaml"><img src="https://github.com/Syntropysoft/SyntropyLog/actions/workflows/ci.yaml/badge.svg" alt="CI Status"></a>
|
|
19
19
|
<a href="#"><img src="https://img.shields.io/badge/coverage-85.67%25-brightgreen" alt="Test Coverage"></a>
|
|
20
|
-
<a href="#"><img src="https://img.shields.io/badge/status-v0.8.
|
|
20
|
+
<a href="#"><img src="https://img.shields.io/badge/status-v0.8.15-brightgreen.svg" alt="Version 0.8.15"></a>
|
|
21
|
+
<a href="https://socket.dev/npm/package/syntropylog"><img src="https://socket.dev/api/badge/npm/package/syntropylog" alt="Socket Badge"></a>
|
|
21
22
|
</p>
|
|
22
23
|
|
|
23
24
|
---
|
|
@@ -56,11 +57,40 @@ SyntropyLog was designed with the constraints of **banking, healthcare, and fina
|
|
|
56
57
|
npm install syntropylog
|
|
57
58
|
```
|
|
58
59
|
|
|
59
|
-
### **
|
|
60
|
+
### **Available Console Transports**
|
|
61
|
+
|
|
62
|
+
By default, SyntropyLog outputs **lightweight plain JSON to the console — automatically, with no configuration needed**. No imports, no setup, no extra dependencies.
|
|
63
|
+
|
|
64
|
+
If you want **colored, human-readable output** for development, explicitly use one of the chalk-powered transports. `chalk` is bundled as a direct dependency of SyntropyLog — no separate install needed.
|
|
65
|
+
|
|
66
|
+
| Transport | Style | Color (chalk) | Recommended for |
|
|
67
|
+
| :--- | :--- | :---: | :--- |
|
|
68
|
+
| *(default)* | Plain JSON | ❌ | Production / log aggregators |
|
|
69
|
+
| `ClassicConsoleTransport` | Structured + colored | ✅ | Development |
|
|
70
|
+
| `PrettyConsoleTransport` | Human-readable pretty print | ✅ | Development / debugging |
|
|
71
|
+
| `CompactConsoleTransport` | Compact one-liner | ✅ | Development |
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
// Default — no import needed, works out of the box
|
|
75
|
+
syntropyLog.init({ logger: { level: 'info', serviceName: 'my-app' } });
|
|
76
|
+
|
|
77
|
+
// Want colors? Import the transport and pass it explicitly:
|
|
78
|
+
import { ClassicConsoleTransport } from 'syntropylog'; // chalk is already included
|
|
79
|
+
|
|
80
|
+
syntropyLog.init({
|
|
81
|
+
logger: {
|
|
82
|
+
level: 'info',
|
|
83
|
+
serviceName: 'my-app',
|
|
84
|
+
transports: [new ClassicConsoleTransport()],
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
|
|
60
90
|
|
|
61
91
|
```typescript
|
|
62
92
|
import { syntropyLog } from 'syntropylog';
|
|
63
|
-
import { ClassicConsoleTransport } from 'syntropylog
|
|
93
|
+
import { ClassicConsoleTransport } from 'syntropylog';
|
|
64
94
|
|
|
65
95
|
const config = {
|
|
66
96
|
logger: {
|