@mcesystems/logging-g4 1.0.65

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 ADDED
@@ -0,0 +1,33 @@
1
+ # @mcesystems/logging-g4
2
+
3
+ Node-only logging client that sends events to the MCE logging service.
4
+
5
+ ## Install
6
+
7
+ ```
8
+ pnpm add @mcesystems/logging-g4
9
+ ```
10
+
11
+ ## Usage (Node only)
12
+
13
+ This package uses Node APIs (`fs`, `os`, `path`) and environment variables. It is not
14
+ compatible with browsers or other non-Node runtimes.
15
+
16
+ ```
17
+ import { LogSeverity } from "@mcesystems/logging-interfaces/lib/sdk";
18
+ import { LogClient } from "@mcesystems/logging-g4";
19
+
20
+ const logClient = new LogClient();
21
+ await logClient.logEvent({
22
+ event_severity: LogSeverity.Info,
23
+ event_type: "device_connected",
24
+ event_info: {
25
+ message: "Device connected",
26
+ source: "device-manager",
27
+ timestamp: new Date().toISOString(),
28
+ },
29
+ context: {
30
+ deviceId: "abc123",
31
+ },
32
+ });
33
+ ```