protected function upgrade450()
    {
        $result = true;
        // Keep track of settings that should be updated.
        $newSettings = array();

        // 1) Log level.
        switch ($this->get('logLevel')) {
            case Log::Error:
            case Log::Warning:
                // This is often not giving enough information, so we set it
                // to Notice by default.
                $newSettings['logLevel'] = Log::Notice;
                break;
            case Log::Info:
                // Info was inserted, so this is the former debug level.
                $newSettings['logLevel'] = Log::Debug;
                break;
        }

        // 2) Debug mode.
        switch ($this->get('debug')) {
            case 4: // Value for deprecated PluginConfig::Debug_StayLocal.
                $newSettings['logLevel'] = PluginConfig::Send_TestMode;
                break;
        }

        if (!empty($newSettings)) {
            $result = $this->save($newSettings);
        }
        return $result;
    }