<include>**/*.wsdl</include>
<include>**/*.xsd</include>
<include>**/*.bpel</include>
+ <include>**/*.yml</include>
</includes>
</fileSet>
<fileSet>
--- /dev/null
+# Copyright (c) 2017-2018 Wind River Systems, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
--- /dev/null
+# Copyright (c) 2017-2018 Wind River Systems, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
--- /dev/null
+# Copyright (c) 2017-2018 Wind River Systems, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
--- /dev/null
+version: 1
+disable_existing_loggers: False
+
+loggers:
+ newton:
+ handlers: [newton_handler]
+ level: "DEBUG"
+ propagate: False
+ newton_base:
+ handlers': [newton_handler]
+ level: "DEBUG"
+ propagate: False
+ common:
+ handlers: [newton_handler]
+ level: "DEBUG"
+ propagate: False
+handlers:
+ newton_handler:
+ level: "DEBUG"
+ class: "logging.handlers.RotatingFileHandler"
+ filename: "/var/log/onap/multicloud/openstack/newton/newton.log"
+ formatter: "mdcFormat"
+ maxBytes: 1024*1024*50
+ backupCount: 10
+formatters:
+ standard:
+ format: "%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:%(message)s"
+ mdcFormat:
+ format: "%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:[%(mdc)s]: %(message)s"
+ mdcfmt: "{requestID}"
+ datefmt: "%Y-%m-%d %H:%M:%S"
+ (): onaplogging.mdcformatter.MDCFormatter
+
+
import os
import sys
+from logging import config
+from onaplogging import monkey
+monkey.patch_all()
+
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
STATIC_URL = '/static/'
-LOGGING = {
- 'version': 1,
- 'disable_existing_loggers': True,
- 'formatters': {
- 'standard': {
- 'format': '%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:%(message)s',
- },
- },
- 'filters': {
- },
- 'handlers': {
- 'newton_handler': {
- 'level': 'DEBUG',
- 'class': 'logging.handlers.RotatingFileHandler',
- 'filename': '/var/log/onap/multicloud/openstack/newton/newton.log',
- 'formatter': 'standard',
- 'maxBytes': 1024 * 1024 * 50,
- 'backupCount': 5,
- },
- },
-
- 'loggers': {
- 'newton': {
- 'handlers': ['newton_handler'],
- 'level': 'DEBUG',
- 'propagate': False
- },
- }
-}
-
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
OPENSTACK_VERSION = "newton"
MULTIVIM_VERSION = "multicloud-" + OPENSTACK_VERSION
+LOGGING_CONFIG = None
+# yaml configuration of logging
+LOGGING_FILE = os.path.join(BASE_DIR, 'newton/pub/config/log.yml')
+config.yamlConfig(filepath=LOGGING_FILE, watchDog=True)
if 'test' in sys.argv:
- LOGGING['handlers']['newton_handler']['filename'] = 'logs/newton.log'
+ #LOGGING['handlers']['newton_handler']['filename'] = 'logs/newton.log'
REST_FRAMEWORK = {}
import platform
coverage==4.2
mock==2.0.0
unittest_xml_reporting==1.12.0
+
+# for onap logging
+onappylog>=1.0.5
+
[tox]
-envlist = py27,py35,cov
+envlist = py27,cov
skipsdist = true
[tox:jenkins]