@logtape/elysia 1.4.0-dev.445 → 1.4.0-dev.460
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 +17 -17
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -75,9 +75,9 @@ Plugin scope
|
|
|
75
75
|
|
|
76
76
|
Elysia supports plugin scoping to control how lifecycle hooks propagate:
|
|
77
77
|
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
78
|
+
- `"global"`: Hooks apply to all routes in the application (default)
|
|
79
|
+
- `"scoped"`: Hooks apply to the parent instance where the plugin is used
|
|
80
|
+
- `"local"`: Hooks only apply within the plugin itself
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
Predefined formats
|
|
@@ -85,11 +85,11 @@ Predefined formats
|
|
|
85
85
|
|
|
86
86
|
The plugin supports Morgan-compatible predefined formats:
|
|
87
87
|
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
88
|
+
- `"combined"`: Apache Combined Log Format with all properties (default)
|
|
89
|
+
- `"common"`: Apache Common Log Format (without referrer/userAgent)
|
|
90
|
+
- `"dev"`: Concise output for development (e.g., `GET /path 200 1.234 ms - 123`)
|
|
91
|
+
- `"short"`: Shorter format with remote address
|
|
92
|
+
- `"tiny"`: Minimal output
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
Custom format function
|
|
@@ -123,15 +123,15 @@ Structured logging output
|
|
|
123
123
|
When using the `"combined"` format (default), the plugin logs structured
|
|
124
124
|
data that includes:
|
|
125
125
|
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
126
|
+
- `method`: HTTP request method
|
|
127
|
+
- `url`: Request URL
|
|
128
|
+
- `path`: Request path
|
|
129
|
+
- `status`: HTTP response status code
|
|
130
|
+
- `responseTime`: Response time in milliseconds
|
|
131
|
+
- `contentLength`: Response content-length header value
|
|
132
|
+
- `remoteAddr`: Remote client address (from X-Forwarded-For header)
|
|
133
|
+
- `userAgent`: User-Agent header value
|
|
134
|
+
- `referrer`: Referrer header value
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
See also
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logtape/elysia",
|
|
3
|
-
"version": "1.4.0-dev.
|
|
3
|
+
"version": "1.4.0-dev.460+d1277bb0",
|
|
4
4
|
"description": "Elysia adapter for LogTape logging library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"logging",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
],
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"elysia": "^1.4.0",
|
|
57
|
-
"@logtape/logtape": "^1.4.0-dev.
|
|
57
|
+
"@logtape/logtape": "^1.4.0-dev.460+d1277bb0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@alinea/suite": "^0.6.3",
|