For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /config/custom-logger.md.
close

customLogger

  • Type: Logger
  • Default: undefined

Uses a custom logger instance for the current Rsbuild instance.

See Logging for more details.

Example

Use createLogger to create a new logger instance.

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

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

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

Version history

VersionChanges
v2.0.0Added the customLogger option