Setting a configInternal setting in AfterInstall

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BattleMetalChris
    Member
    • Mar 2021
    • 52

    #1

    Setting a configInternal setting in AfterInstall

    I'm trying to set the 'databaseHandler' field of the logger to true in config-internal, using AfterInstall.php in my extension scripts

    I'm currently doing

    PHP Code:
    $injectableFactory $this->container->get('injectableFactory');
    $configWriter $injectableFactory->create(Config\ConfigWriter::class);

    $configWriter->set('logger.databaseHandler'true);
    $configWriter->save(); 



    But all that does is create a field called 'logger.databaseHandler' => true in the main config.php

    How do I write to config-internal and set the field inside the existing 'logger' entry?
Working...