# Configuration & Options — Fastify

Source: https://www.geekswithgeeks.com/en/fastify/ff-configuration

> Customize Fastify instance behavior with configuration options.

## Common options

Set logger, body size limits, request ID generation, and more when creating the Fastify instance.

```javascript
const fastify = Fastify({
  logger: true,                    // enable logging
  bodyLimit: 1048576,              // 1MB
  disableRequestLogging: false,
  trustProxy: true,                // if behind a reverse proxy
  requestIdLogLabel: 'requestId',
});
```

## Logger levels

Use pino (built-in logger) levels: trace, debug, info, warn, error, fatal. Set with `{ logger: { level: 'debug' } }`.
