added pipenv as a recommend use case for development, updated core-daemon script to allow a parameter to pass in the logging configuration
This commit is contained in:
parent
76846fefeb
commit
6d8099e8c6
5 changed files with 441 additions and 29 deletions
|
@ -9,14 +9,17 @@ from core import constants
|
|||
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||
|
||||
|
||||
def load_logging_config():
|
||||
def load_logging_config(config_path=None):
|
||||
"""
|
||||
Load CORE logging configuration file.
|
||||
|
||||
:param str config_path: path to logging config file,
|
||||
when None defaults to /etc/core/logging.conf
|
||||
:return: nothing
|
||||
"""
|
||||
log_config_path = os.path.join(constants.CORE_CONF_DIR, "logging.conf")
|
||||
with open(log_config_path, "r") as log_config_file:
|
||||
if config_path is None:
|
||||
config_path = os.path.join(constants.CORE_CONF_DIR, "logging.conf")
|
||||
with open(config_path, "r") as log_config_file:
|
||||
log_config = json.load(log_config_file)
|
||||
logging.config.dictConfig(log_config)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue