Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
feat(es): log confing only in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Vixtir committed Sep 11, 2023
1 parent b2d9f77 commit f181d9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions odd_collector/adapters/elasticsearch/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Adapter(AbstractAdapter):
def __init__(self, config: ElasticsearchPlugin) -> None:
self.__es_client = Elasticsearch(
hosts=[f"{config.host}:{config.port}"],
basic_auth=(config.username, config.password),
basic_auth=(config.username, config.password.get_secret_value()),
verify_certs=config.verify_certs,
ca_certs=config.ca_certs,
)
Expand All @@ -37,7 +37,7 @@ def get_data_source_oddrn(self) -> str:
return self.__oddrn_generator.get_data_source_oddrn()

def get_datasets(self) -> Iterable[DataEntity]:
logger.info(f"Start collecting datasets from Elasticsearch at {self.config}")
logger.debug(f"Start collecting datasets from Elasticsearch at {self.config}")
result = []
logger.info("Get indices")
indices = self.__get_indices()
Expand Down
2 changes: 1 addition & 1 deletion odd_collector/domain/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class ElasticsearchPlugin(WithHost):
host: str
port: str
username: str
password: str
password: SecretStr
verify_certs: Optional[bool] = None
ca_certs: Optional[str] = None

Expand Down

0 comments on commit f181d9c

Please sign in to comment.