diff --git a/dbt/adapters/events/types.py b/dbt/adapters/events/types.py index ddd435b9..c49fef9b 100644 --- a/dbt/adapters/events/types.py +++ b/dbt/adapters/events/types.py @@ -2,6 +2,7 @@ from dbt.adapters.events.base_types import ( DebugLevel, + DynamicLevel, ErrorLevel, InfoLevel, WarnLevel, @@ -281,7 +282,7 @@ def message(self) -> str: # Skipping E032, E033, E034 -class AdapterRegistered(InfoLevel): +class AdapterRegistered(DynamicLevel): def code(self) -> str: return "E034" diff --git a/dbt/adapters/factory.py b/dbt/adapters/factory.py index d77ad2f4..91ef3fd4 100644 --- a/dbt/adapters/factory.py +++ b/dbt/adapters/factory.py @@ -7,6 +7,7 @@ from typing import Any, Dict, List, Optional, Set, Type from dbt_common.events.functions import fire_event +from dbt_common.events.base_types import EventLevel from dbt_common.exceptions import DbtInternalError, DbtRuntimeError from dbt_common.semver import VersionSpecifier @@ -96,11 +97,22 @@ def load_plugin(self, name: str) -> Type[Credentials]: return plugin.credentials - def register_adapter(self, config: AdapterRequiredConfig, mp_context: SpawnContext) -> None: + def register_adapter( + self, + config: AdapterRequiredConfig, + mp_context: SpawnContext, + AdapterRegistered_log_level: EventLevel=EventLevel.INFO + ) -> None: adapter_name = config.credentials.type adapter_type = self.get_adapter_class_by_name(adapter_name) adapter_version = self._adapter_version(adapter_name) - fire_event(AdapterRegistered(adapter_name=adapter_name, adapter_version=adapter_version)) + fire_event( + AdapterRegistered( + adapter_name=adapter_name, + adapter_version=adapter_version + ), + level=AdapterRegistered_log_level + ) with self.lock: if adapter_name in self.adapters: # this shouldn't really happen...