elysia-wide-event 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +8 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -14,6 +14,7 @@ Inspired by [Logging Sucks](https://loggingsucks.com/) - the wide event pattern
14
14
 
15
15
  ## Features
16
16
 
17
+ - **Server Start Log**: Log custom data on server startup with `start` option
17
18
  - **Context Accumulation**: Collect data throughout request lifecycle via `wideEvent.set()`
18
19
  - **Flexible Output**: Pretty colored output or JSON - you choose
19
20
  - **Request ID**: Auto-generates or extracts from `x-request-id` header
@@ -55,14 +56,16 @@ wideEvent({
55
56
  generateRequestId: () => crypto.randomUUID(),
56
57
  requestIdHeader: "x-request-id",
57
58
  json: false,
59
+ start: { env: "production", version: "1.0.0" },
58
60
  });
59
61
  ```
60
62
 
61
- | Option | Type | Default | Description |
62
- | ------------------- | -------------- | ------------------- | --------------------------------------- |
63
- | `generateRequestId` | `() => string` | `crypto.randomUUID` | Custom request ID generator |
64
- | `requestIdHeader` | `string` | `"x-request-id"` | Header for incoming request ID |
65
- | `json` | `boolean` | `false` | Output as JSON instead of pretty format |
63
+ | Option | Type | Default | Description |
64
+ | ------------------- | -------------- | ------------------- | ----------------------------------------------------- |
65
+ | `generateRequestId` | `() => string` | `crypto.randomUUID` | Custom request ID generator |
66
+ | `requestIdHeader` | `string` | `"x-request-id"` | Header for incoming request ID |
67
+ | `json` | `boolean` | `false` | Output as JSON instead of pretty format |
68
+ | `start` | `LogData` | `undefined` | Custom data to log on server startup (URL auto-added) |
66
69
 
67
70
  ## API
68
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elysia-wide-event",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Wide event logging plugin for Elysia - structured logging with request context",
5
5
  "author": "Jay Choi",
6
6
  "license": "MIT",