set log dir if not exits

Change-Id: If3e71abdf612d34e814aa1b4c6dc1df444fcb728
This commit is contained in:
jiasirui 2021-12-28 13:54:17 +08:00
parent 4ce191206b
commit b806026a1f

View File

@ -15,6 +15,7 @@
"""Starter script for Venus API."""
import eventlet
import os
import sys
from oslo_log import log as logging
@ -33,10 +34,10 @@ i18n.enable_lazy()
def main():
CONF(sys.argv[1:], project='venus',
version=version.version_string())
# logdir = CONF.log_dir
# is_exits = os.path.exists(logdir)
# if not is_exits:
# os.makedirs(logdir)
logdir = CONF.log_dir
is_exits = os.path.exists(logdir)
if not is_exits:
os.makedirs(logdir)
logging.setup(CONF, "venus")
utils.monkey_patch()