kint(Database::setActiveConnection('preview')); \Drupal::logger('Little kitties')->info('Mau'); kint(Database::setActiveConnection('default')); As my expectation this would create a watchdog entry in preview database. The entry got created in the default database instead. This means, setActiveConnection() only affects direct queries (select and db_query..)? That would be really sad.