Problem/Motivation

Version 3.0 added a configurable minimum severity level, but did not add an update hook to set the default value so nothing would be logged as $this->config->get('severity_level') is NULL:

    if ($level > $this->config->get('severity_level')) {
      // Severity level is above the ones we want to log.
      return;
    }

Steps to reproduce

Install v 8.x-1.5 then update to 3.0.0

Proposed resolution

Add update hook to set the severity_level config to 3, as per the /config/install/log_stdout.settings.yml file.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork log_stdout-3597159

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

smaz created an issue. See original summary.

smaz’s picture

Assigned: smaz » Unassigned
Status: Active » Needs review
liam morland’s picture

Thanks for the patch. It would be safer if it would give the default behavior when the value is null. It could become null by someone deleting the config. That should return it to the default.