From 5fa2cb4a4ebf2cf33727049fa942ebf7fd6f6bd4 Mon Sep 17 00:00:00 2001 From: Vidya Shinde Date: Fri, 11 Aug 2017 18:21:58 +0530 Subject: [LOG] Add canonicalization for SDC logs Canonicalization of path for log provider configuration file and log files Change-Id: I0fb1996ee412ec6c278e82ca063bd0c14b0a1ec2 Issue-ID: LOG-24 Signed-off-by: Vidya Shinde --- onap/sdc/README.md | 39 ++++++++++ onap/sdc/be/logback.xml | 187 ++++++++++++++++++++++++++++++++++++++++++++++++ onap/sdc/fe/logback.xml | 187 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 413 insertions(+) create mode 100644 onap/sdc/README.md create mode 100644 onap/sdc/be/logback.xml create mode 100644 onap/sdc/fe/logback.xml (limited to 'onap') diff --git a/onap/sdc/README.md b/onap/sdc/README.md new file mode 100644 index 0000000..e42f397 --- /dev/null +++ b/onap/sdc/README.md @@ -0,0 +1,39 @@ +############################################################################################################################################## +## SDC logging configuration +================================================================================================= +SDC has two docker containers - sdc-BE and sdc-FE. +Each one has its own separate logback.xml file. +Canonical logs will be generated at /var/log/onap/sdc/ +================================================================================================= +## Instructions for deployment +================================================================================================= +### SDC logging deployment for sdc-FE +------------------------------------------------------------------------------------------------- + 1. Create the canonical path for log provider, /etc/onap/sdc/conf.d/fe, on the host VM. + 2. Copy the logback.xml from 'fe' directory (of gerrit) into the path created in step 1. + 3. Create the canonical path for logs, /var/log/onap/sdc/sdc-fe, on the host VM. + 4. Provide write permissions for "others" user for directory created in step 3. + 5. Volume-Mount: The sdc-FE container requires two host paths mapped as volume in the container + 5.1. Log Provider file path: + Host path - /etc/onap/sdc/conf.d/fe/logback.xml mapped to + Container path - ${JETTY_BASE}/config/catalog-fe/logback.xml + 5.2. Log file path: + Host path - /var/log/onap/sdc/sdc-fe/ mapped to + Container path - /var/log/onap/sdc/sdc-fe/ +------------------------------------------------------------------------------------------------- +### SDC logging deployment for sdc-BE +------------------------------------------------------------------------------------------------- + 1. Create the canonical path for log provider, /etc/onap/sdc/conf.d/be, on the host VM. + 2. Copy the logback.xml from 'be' directory (of gerrit) into the canonical path created in step 1. + 3. Create the canonical path for logs, /var/log/onap/sdc/sdc-be, on the host VM. + 4. Provide write permissions for "others" user for directory created in step 3. + 5. Volume-Mount: The sdc-BE container requires two host paths mapped as volume in the container + 5.1. Log Provider file path: + Host path - /etc/onap/sdc/conf.d/be/logback.xml mapped to + Container path - ${JETTY_BASE}/config/catalog-be/logback.xml + 5.2. Log file path: + Host path - /var/log/onap/sdc/sdc-be/ mapped to + Container path - /var/log/onap/sdc/sdc-be/ +------------------------------------------------------------------------------------------------- +Note - ${JETTY_BASE} in the test environment was set to /var/lib/jetty/ +############################################################################################################################################## diff --git a/onap/sdc/be/logback.xml b/onap/sdc/be/logback.xml new file mode 100644 index 0000000..a014e57 --- /dev/null +++ b/onap/sdc/be/logback.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${logDirectory}/${allLogName}.log + + ${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + + + + + ${logDirectory}/${errorLogName}.log + + + + AUDIT_MARKER + + NEUTRAL + DENY + + + + + TRANSACTION_MARKER + + NEUTRAL + DENY + + + + INFO + + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${debugLogName}.log + + + + + TRANSACTION_MARKER + + NEUTRAL + DENY + + + + + e.level.toInt() <= DEBUG.toInt() + + DENY + NEUTRAL + + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${auditLogName}.log + + + + AUDIT_MARKER + + DENY + ACCEPT + + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${transactionLogName}.log + + + + TRANSACTION_MARKER + + DENY + ACCEPT + + + ${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${queueSize} + + + + ${queueSize} + + + + ${queueSize} + + + + ${queueSize} + + + + + + + + + + + + + + + diff --git a/onap/sdc/fe/logback.xml b/onap/sdc/fe/logback.xml new file mode 100644 index 0000000..8c25b69 --- /dev/null +++ b/onap/sdc/fe/logback.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${logDirectory}/${allLogName}.log + + ${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + + + + + ${logDirectory}/${errorLogName}.log + + + + AUDIT_MARKER + + NEUTRAL + DENY + + + + + TRANSACTION_MARKER + + NEUTRAL + DENY + + + + INFO + + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${debugLogName}.log + + + + + TRANSACTION_MARKER + + NEUTRAL + DENY + + + + + e.level.toInt() <= DEBUG.toInt() + + DENY + NEUTRAL + + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${auditLogName}.log + + + + AUDIT_MARKER + + DENY + ACCEPT + + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${transactionLogName}.log + + + + TRANSACTION_MARKER + + DENY + ACCEPT + + + ${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${queueSize} + + + + ${queueSize} + + + + ${queueSize} + + + + ${queueSize} + + + + + + + + + + + + + + + -- cgit 1.2.3-korg