Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
EOS-27348: Remove CortxConf
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Dwivedi <[email protected]>
  • Loading branch information
rohit-k-dwivedi committed Jan 19, 2022
1 parent f531f4b commit 5a0746c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions py-utils/src/utils/setup/kafka/kafka_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@
# For any questions about this software or licensing,
# please email [email protected] or [email protected].

import os
import sys
import errno
import argparse
import inspect
import traceback

from cortx.utils.log import Log
from cortx.utils.common import CortxConf
from cortx.utils.conf_store import Conf
from cortx.utils.setup.kafka import Kafka
from cortx.utils.conf_store import MappedConf
from cortx.utils.setup.kafka import KafkaSetupError


Expand Down Expand Up @@ -205,10 +206,11 @@ def main(argv: dict):
Conf.load(kafka_config, command.url)
kafka_servers = Conf.get(kafka_config, 'cortx>software>kafka>servers')
# Get log path and initialise Log
CortxConf.init(cluster_conf=command.cluster_conf)
log_dir = CortxConf.get_storage_path('log')
log_path = CortxConf.get_log_path(base_dir=log_dir)
log_level = CortxConf.get('utils>log_level', 'INFO')
cluster_conf_store = MappedConf(command.cluster_conf)
log_dir = cluster_conf_store.get('cortx>common>storage>log')
log_dir = log_dir if log_dir else cluster_conf_store.get('log_dir')
log_path = os.path.join(log_dir, f'utils/{Conf.machine_id}')
log_level = cluster_conf_store.get('utils>log_level', 'INFO')
Log.init('kafka_setup', log_path, level=log_level, backup_count=5, \
file_size_in_mb=5)

Expand Down

0 comments on commit 5a0746c

Please sign in to comment.