How to use custom logger in TypeORM with Nest.js?

I created my custom DBLogger class which implements typeorm’s Logger interface.

Added to app.module.ts the following:

TypeOrmModule.forRoot({
  logging: true,
  logger: new DBLogger(),
}),

But all typeorm logs are logging to stdout (my console). What’s wrong?