<packaging>pom</packaging>
<name>multicloud/openstack/windriver</name>
<description>multicloud for openstack Wind River Titanium Cloud</description>
- <dependencies>
- <dependency>
- <groupId>org.onap.multicloud.openstack</groupId>
- <artifactId>multicloud-openstack-newton</artifactId>
- <version>1.1.0</version>
- <type>zip</type>
- </dependency>
- </dependencies>
<properties>
<encoding>UTF-8</encoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
--- /dev/null
+version: 1
+disable_existing_loggers: False
+
+loggers:
+ titanium_cloud:
+ handlers: [titanium_cloud_handler]
+ level: "DEBUG"
+ propagate: False
+ newton_base:
+ handlers': [titanium_cloud_handler]
+ level: "DEBUG"
+ propagate: False
+ common:
+ handlers: [titanium_cloud_handler]
+ level: "DEBUG"
+ propagate: False
+handlers:
+ titanium_cloud_handler:
+ level: "DEBUG"
+ class: "logging.handlers.RotatingFileHandler"
+ filename: "/var/log/onap/multicloud/openstack/windriver/titanium_cloud.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()
+
+
CACHE_EXPIRATION_TIME = 3600
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
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': {
- 'titanium_cloud_handler': {
- 'level': 'DEBUG',
- 'class': 'logging.handlers.RotatingFileHandler',
- 'filename': '/var/log/onap/multicloud/openstack/windriver/titanium_cloud.log',
- 'formatter': 'standard',
- 'maxBytes': 1024 * 1024 * 50,
- 'backupCount': 5,
- },
- },
-
- 'loggers': {
- 'titanium_cloud': {
- 'handlers': ['titanium_cloud_handler'],
- 'level': 'DEBUG',
- 'propagate': False
- },
- 'newton_base': {
- 'handlers': ['titanium_cloud_handler'],
- 'level': 'DEBUG',
- 'propagate': False
- },
- 'common': {
- 'handlers': ['titanium_cloud_handler'],
- 'level': 'DEBUG',
- 'propagate': False
- },
- }
-}
DEFAULT_MSB_ADDR = "127.0.0.1"
DEFAULT_CACHE_BACKEND_LOCATION = '127.0.0.1:11211'
OPENSTACK_VERSION = "titanium_cloud"
MULTIVIM_VERSION = "multicloud-" + OPENSTACK_VERSION
+
+LOGGING_CONFIG = None
+# yaml configuration of logging
+LOGGING_FILE = os.path.join(BASE_DIR, 'titanium_cloud/pub/config/log.yml')
+config.yamlConfig(filepath=LOGGING_FILE, watchDog=True)
+
if 'test' in sys.argv:
- LOGGING['handlers']['titanium_cloud_handler']['filename'] = 'logs/titanium_cloud.log'
+ #LOGGING['handlers']['titanium_cloud_handler']['filename'] = 'logs/titanium_cloud.log'
REST_FRAMEWORK = {}
import platform