This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rohit Dwivedi <[email protected]>
- Loading branch information
1 parent
f531f4b
commit 5a0746c
Showing
1 changed file
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
||
|
@@ -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) | ||
|
||
|