Added logger config path attribute to NodeBase class

Signed-off-by: Dmitry Anurin <d.anurin@yadro.com>
master
anurindm 2023-11-21 10:20:01 +03:00
parent ae566b413b
commit 247d2fbab7
2 changed files with 9 additions and 0 deletions

View File

@ -6,6 +6,7 @@ class ConfigAttributes:
CONFIG_DIR = "service_config_dir"
CONFIG_PATH = "config_path"
SHARD_CONFIG_PATH = "shard_config_path"
LOGGER_CONFIG_PATH = "logger_config_path"
LOCAL_WALLET_PATH = "local_wallet_path"
LOCAL_WALLET_CONFIG = "local_config_path"
ENDPOINT_DATA_0 = "endpoint_data0"

View File

@ -120,6 +120,14 @@ class NodeBase(HumanReadableABC):
ConfigAttributes.WALLET_CONFIG,
)
def get_logger_config_path(self) -> str:
"""
Returns config path for logger located on remote host
"""
config_attributes = self.host.get_service_config(self.name)
return self._get_attribute(
ConfigAttributes.LOGGER_CONFIG_PATH) if ConfigAttributes.LOGGER_CONFIG_PATH in config_attributes.attributes else None
@property
def config_dir(self) -> str:
return self._get_attribute(ConfigAttributes.CONFIG_DIR)