> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# customLogger

- **Type:** [Logger](/api/javascript-api/core.md#logger)
- **Default:** `undefined`

Uses a custom logger instance for the current Rsbuild instance.

> See [Logging](/guide/advanced/logging.md) for more details.

## Example

Use [createLogger](/api/javascript-api/core.md#createlogger) to create a new logger instance.

```ts title="rsbuild.config.ts"
import { createLogger, defineConfig } from '@rsbuild/core';

const logger = createLogger({
  level: 'warn',
});

export default defineConfig({
  customLogger: logger,
});
```

## Version history

| Version | Changes                         |
| ------- | ------------------------------- |
| v2.0.0  | Added the `customLogger` option |
