@pands/logger 0.1.0 → 0.1.1
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 +40 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# @pands/logger
|
|
2
|
+
|
|
3
|
+
> High-performance Pino structured logger with automatic secret redaction for the **Pand Application Platform**.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@pands/logger)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
`@pands/logger` standardizes JSON logging across microservices with automatic redaction of sensitive credentials, tokens, and authorization headers.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pnpm add @pands/logger
|
|
16
|
+
# or with npm:
|
|
17
|
+
npm install @pands/logger
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { createLogger } from "@pands/logger";
|
|
26
|
+
|
|
27
|
+
const logger = createLogger({
|
|
28
|
+
service: "billing",
|
|
29
|
+
level: process.env.LOG_LEVEL || "info",
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
logger.info({ invoiceId: "inv_123", amount: 200 }, "Invoice processed successfully");
|
|
33
|
+
logger.error(new Error("Failed to charge card"), "Payment processing failed");
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## License
|
|
39
|
+
|
|
40
|
+
MIT © [Mehdi Nosrati](https://github.com/MehdiNosrati)
|