mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-07-01 22:49:06 +00:00
perf: remove logging.basicConfig in jms second, because invalid
This commit is contained in:
14
jms
14
jms
@@ -20,7 +20,14 @@ sys.path.insert(0, APP_DIR)
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "jumpserver.settings")
|
||||
django.setup()
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG, format="%(asctime)s %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
|
||||
try:
|
||||
from django.conf import settings
|
||||
log_level = logging.DEBUG if settings.DEBUG_DEV else logging.INFO
|
||||
except Exception as e:
|
||||
print("Load settings error: {}".format(e))
|
||||
log_level = logging.INFO
|
||||
|
||||
logging.basicConfig(level=log_level, format="%(asctime)s %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
|
||||
|
||||
try:
|
||||
from jumpserver import const
|
||||
@@ -44,11 +51,6 @@ except ImportError as e:
|
||||
|
||||
os.environ["PYTHONIOENCODING"] = "UTF-8"
|
||||
|
||||
logging.basicConfig(
|
||||
format='%(asctime)s %(message)s', level=logging.INFO,
|
||||
datefmt='%Y-%m-%d %H:%M:%S'
|
||||
)
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user