aboutsummaryrefslogtreecommitdiffstats
path: root/catalog/settings.py
diff options
context:
space:
mode:
authordyh <dengyuanhong@chinamobile.com>2019-12-04 16:19:38 +0800
committerdyh <dengyuanhong@chinamobile.com>2019-12-04 16:22:35 +0800
commitf96008008bcbefd4142611c9ecca45899c5bb7d6 (patch)
tree3594854d280b97393595989cd903fd5f2a8bd2d2 /catalog/settings.py
parent06bfcce3f57176e6b428e43e8e411e245a5fa75e (diff)
update ns on_distribute method
Issue-ID: MODELING-289 Change-Id: Iba353d152b4895a93d0d41ac58afd63f1845c5d4 Signed-off-by: dyh <dengyuanhong@chinamobile.com>
Diffstat (limited to 'catalog/settings.py')
-rw-r--r--catalog/settings.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/catalog/settings.py b/catalog/settings.py
index df9d5f0..40c7565 100644
--- a/catalog/settings.py
+++ b/catalog/settings.py
@@ -23,6 +23,7 @@ from catalog.pub.config.config import DB_NAME, DB_IP, DB_USER, DB_PASSWD, DB_POR
from catalog.pub.config import config as pub_config
from logging import config as log_config
from onaplogging import monkey
+
monkey.patch_all()
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
@@ -161,11 +162,16 @@ if platform.system() == 'Windows' or 'test' in sys.argv:
'maxBytes': 1024 * 1024 * 50,
'backupCount': 5,
},
+ 'console': {
+ 'level': 'DEBUG',
+ 'class': 'logging.StreamHandler',
+ 'formatter': 'standard'
+ },
},
'loggers': {
'catalog': {
- 'handlers': ['catalog_handler'],
+ 'handlers': ['catalog_handler', 'console'],
'level': 'DEBUG',
'propagate': False
},
@@ -200,5 +206,6 @@ if 'test' in sys.argv:
import mock
from catalog.pub.utils import idutil
+
idutil.get_auto_id = mock.Mock()
idutil.get_auto_id.return_value = 1