You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can also set a pre-compression logger to capture request/response data before compression is applied. This is useful for debugging and monitoring purposes when you need to see the original, uncompressed response content:
284
+
#### Pre-compression Logging
285
+
286
+
You can also set a pre-compression logger to capture request/response data before compression is applied:
// Log before compression - res.body contains uncompressed content
283
291
// Content-Encoding header is not yet set
284
292
your_pre_compression_logger(req, res);
285
293
});
286
294
```
287
295
288
-
The pre-compression logger is only called when compression would be applied. For responses without compression, only the regular logger is called.
296
+
The pre-compression logger is only called when compression would be applied. For responses without compression, only the access logger is called.
297
+
298
+
#### Error Logging
299
+
300
+
Error loggers capture failed requests and connection issues. Unlike access loggers, error loggers only receive the Error and Request information, as errors typically occur before a meaningful Response can be generated.
0 commit comments