voltlog-io 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Rohit Tiwari
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # VoltLog
2
+
3
+ #### Structured logger for real-time infrastructure
4
+
5
+ [![npm version](https://img.shields.io/npm/v/voltlog-io?color=blue)](https://www.npmjs.com/package/voltlog-io)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![Build & Test](https://github.com/rohittiwari-dev/voltlog-io/actions/workflows/ci.yml/badge.svg)](https://github.com/rohittiwari-dev/voltlog-io/actions)
8
+
9
+ **VoltLog** is a modern, lightweight, and type-safe structured logger designed specifically for high-throughput, real-time systems like IoT platforms, WebSocket servers (OCPP), and microservices.
10
+
11
+ ## 📚 Full Documentation
12
+
13
+ For detailed guides, API reference, and advanced usage, please visit:
14
+
15
+ ### [👉 https://ocpp-ws-io.rohittiwari.me/docs/voltlog-io](https://ocpp-ws-io.rohittiwari.me/docs/voltlog-io)
16
+
17
+ ---
18
+
19
+ ## ✨ Key Features
20
+
21
+ - **🚀 Zero-Dependency Core**: Lightweight and fast.
22
+ - **🔒 Secure**: Built-in redaction for sensitive data.
23
+ - **📊 High-Throughput**: Intelligent sampling for cost control.
24
+ - **⚡ Developer Friendly**: Beautiful pretty printing for local dev.
25
+ - **🔌 Flexible**: Works in Node.js, Bun, Deno, and Browsers.
26
+
27
+ ## 📦 Installation
28
+
29
+ ```bash
30
+ npm install voltlog-io
31
+ ```
32
+
33
+ ## 🚀 Quick Start
34
+
35
+ ```ts
36
+ import { createLogger, consoleTransport } from "voltlog-io";
37
+
38
+ const logger = createLogger({
39
+ level: "INFO",
40
+ transports: [consoleTransport()],
41
+ });
42
+
43
+ logger.info("Server started", { port: 3000, env: "production" });
44
+ ```
45
+
46
+ ### Local Development
47
+
48
+ For readable, colored logs during development:
49
+
50
+ ```ts
51
+ import { createLogger, prettyTransport } from "voltlog-io";
52
+
53
+ const logger = createLogger({
54
+ level: "DEBUG",
55
+ transports: [prettyTransport({ colorize: true })],
56
+ });
57
+ ```
58
+
59
+ ## 🤝 Contributing
60
+
61
+ Contributions are welcome! Please see our [Contributing Guide](CONTRIBUTING.md).
62
+
63
+ ## License
64
+
65
+ [MIT](LICENSE) © [Rohit Tiwari](https://github.com/rohittiwari-dev)