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
@@ -405,6 +417,26 @@ await mock.start(); // Restarts with new settings
405
417
406
418
For the complete list of options, see the [@fastify/rate-limit documentation](https://github.com/fastify/fastify-rate-limit#options).
407
419
420
+
# Logging
421
+
422
+
MockHttp uses [Pino](https://github.com/pinojs/pino) for logging via Fastify's built-in logger. Logging is **enabled by default** but can be disabled when needed.
423
+
424
+
## Disabling Logging
425
+
426
+
```javascript
427
+
import { MockHttp } from'@jaredwray/mockhttp';
428
+
429
+
constmock=newMockHttp({ logging:false });
430
+
awaitmock.start();
431
+
// Server runs silently without any log output
432
+
```
433
+
434
+
You can also disable logging via the `LOGGING` environment variable:
435
+
436
+
```bash
437
+
LOGGING=false node your-app.js
438
+
```
439
+
408
440
# API Reference
409
441
410
442
## MockHttp Class
@@ -423,6 +455,7 @@ new MockHttp(options?)
423
455
- `helmet?`: boolean - Use Helmet for security headers (default: true)
424
456
- `apiDocs?`: boolean - Enable Swagger API documentation (default: true)
0 commit comments