summaryrefslogtreecommitdiffstats
path: root/ocata/ocata/pub
diff options
context:
space:
mode:
authorYun Huang <yun.huang@windriver.com>2018-03-15 22:15:37 +0800
committerYun Huang <yun.huang@windriver.com>2018-03-15 22:15:37 +0800
commit70b3774c3855f256ad9976743f433d88eacab655 (patch)
tree047988dad7cc56088accd2e6e96c2732d93eaacf /ocata/ocata/pub
parentcabc350593488b32980bd3310754018e99a48945 (diff)
Enable AOP for ocata logging
Change-Id: I8a616e99d4fba368b7bedb9fc4c40ba4ceb10445 Issue-ID: MULTICLOUD-177 Signed-off-by: Yun Huang <yun.huang@windriver.com>
Diffstat (limited to 'ocata/ocata/pub')
-rw-r--r--ocata/ocata/pub/__init__.py14
-rw-r--r--ocata/ocata/pub/config/__init__.py14
-rw-r--r--ocata/ocata/pub/config/config.py13
-rw-r--r--ocata/ocata/pub/config/log.yml34
4 files changed, 75 insertions, 0 deletions
diff --git a/ocata/ocata/pub/__init__.py b/ocata/ocata/pub/__init__.py
new file mode 100644
index 00000000..afa702d3
--- /dev/null
+++ b/ocata/ocata/pub/__init__.py
@@ -0,0 +1,14 @@
+# 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.
+
diff --git a/ocata/ocata/pub/config/__init__.py b/ocata/ocata/pub/config/__init__.py
new file mode 100644
index 00000000..afa702d3
--- /dev/null
+++ b/ocata/ocata/pub/config/__init__.py
@@ -0,0 +1,14 @@
+# 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.
+
diff --git a/ocata/ocata/pub/config/config.py b/ocata/ocata/pub/config/config.py
new file mode 100644
index 00000000..ae1ce9db
--- /dev/null
+++ b/ocata/ocata/pub/config/config.py
@@ -0,0 +1,13 @@
+# 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.
diff --git a/ocata/ocata/pub/config/log.yml b/ocata/ocata/pub/config/log.yml
new file mode 100644
index 00000000..224864d1
--- /dev/null
+++ b/ocata/ocata/pub/config/log.yml
@@ -0,0 +1,34 @@
+version: 1
+disable_existing_loggers: False
+
+loggers:
+ ocata:
+ handlers: [ocata_handler]
+ level: "DEBUG"
+ propagate: False
+ newton_base:
+ handlers': [ocata_handler]
+ level: "DEBUG"
+ propagate: False
+ common:
+ handlers: [ocata_handler]
+ level: "DEBUG"
+ propagate: False
+handlers:
+ ocata_handler:
+ level: "DEBUG"
+ class: "logging.handlers.RotatingFileHandler"
+ filename: "/var/log/onap/multicloud/openstack/ocata/ocata.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
+
+