mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: add MAXKB_LOG_LEVEL env.
This commit is contained in:
parent
b06d5685f2
commit
0e3ae6a8f8
|
|
@ -81,6 +81,9 @@ class Config(dict):
|
|||
def get_language_code(self):
|
||||
return self.get('LANGUAGE_CODE', 'zh-CN')
|
||||
|
||||
def get_log_level(self):
|
||||
return self.get('LOG_LEVEL', 'DEBUG')
|
||||
|
||||
def __init__(self, *args):
|
||||
super().__init__(*args)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from ..const import PROJECT_DIR, CONFIG, LOG_DIR
|
|||
MAX_KB_LOG_FILE = os.path.join(LOG_DIR, 'maxkb.log')
|
||||
DRF_EXCEPTION_LOG_FILE = os.path.join(LOG_DIR, 'drf_exception.log')
|
||||
UNEXPECTED_EXCEPTION_LOG_FILE = os.path.join(LOG_DIR, 'unexpected_exception.log')
|
||||
LOG_LEVEL = "DEBUG"
|
||||
LOG_LEVEL = CONFIG.get_log_level()
|
||||
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
|
|
|
|||
|
|
@ -31,4 +31,5 @@ ENV PGDATA=/opt/maxkb/data/postgresql/pgdata \
|
|||
POSTGRES_PASSWORD=Password123@postgres \
|
||||
POSTGRES_MAX_CONNECTIONS=1000 \
|
||||
REDIS_PASSWORD=Password123@redis \
|
||||
LANG=en_US.UTF-8
|
||||
LANG=en_US.UTF-8 \
|
||||
MAXKB_LOG_LEVEL=INFO
|
||||
|
|
|
|||
Loading…
Reference in New Issue