mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-16 22:17:59 +00:00
fix LOGGING_IGNORE_MODULES (#7562)
* fix LOGGING_IGNORE_MODULES * Add default handler when used custom LOGGING
This commit is contained in:
parent
df4e04d427
commit
2912a422bf
@ -1137,6 +1137,16 @@ else:
|
|||||||
load_local_settings(seahub_settings)
|
load_local_settings(seahub_settings)
|
||||||
del seahub_settings
|
del seahub_settings
|
||||||
|
|
||||||
|
# Add default handler when used custom LOGGING
|
||||||
|
if 'default' not in LOGGING['handlers']:
|
||||||
|
LOGGING['handlers']['default'] = {
|
||||||
|
'level': 'INFO',
|
||||||
|
'class': 'logging.handlers.RotatingFileHandler',
|
||||||
|
'filename': os.path.join(LOG_DIR, 'seahub.log'),
|
||||||
|
'maxBytes': 1024*1024*100, # 100 MB
|
||||||
|
'backupCount': 5,
|
||||||
|
'formatter': 'standard',
|
||||||
|
}
|
||||||
# Ignore logs of component in INFO level, and set it to ERROR level
|
# Ignore logs of component in INFO level, and set it to ERROR level
|
||||||
for module in LOGGING_IGNORE_MODULES:
|
for module in LOGGING_IGNORE_MODULES:
|
||||||
if module not in LOGGING['loggers']:
|
if module not in LOGGING['loggers']:
|
||||||
|
Loading…
Reference in New Issue
Block a user