[LOG] Add canonicalization for Portal logs
[logging-analytics.git] / onap / portal / README.md
1 ##############################################################################################################################################
2 ## Portal Logging Configuration
3 =================================================================================================
4 Portal has two docker containers- portal and mariadb.
5 The canonical logging implementation is only done for the container, portal.
6 Portal has two sub-modules portal-be and portal-db each one has its own separate logback.xml file.
7 Canonical logs will be generated at /var/log/onap/portal/
8 =================================================================================================
9 ## Instructions for deployment
10 =================================================================================================
11 ### Portal logging deployment for sub-module portal-be
12 -------------------------------------------------------------------------------------------------
13   1. Log provider file is available at the path, /opt/apache-tomcat-8.0.37/webapps/ECOMPPORTAL/WEB-INF/classes, in the container.
14   2. Copy the canonical logback.xml from 'portal-be' directory (of gerrit) into the path mentioned in step 1.
15   3. Create the canonical path for logs, /var/log/onap/portal/portal-be on the host VM.
16   4. Provide write permissions for "others" users for directory created in step 3.
17   5. Volume-Mount: The portal container requires one host path mapped as volume in the container
18         
19       5.1. Log file path:
20         Host path -      /var/log/onap/portal/portal-be/ mapped to 
21         Container path - /var/log/onap/portal/portal-be/      
22       5.2. Log provider file path:              
23         Note: Log provider path cannot be configured externally as it is bundled inside a WAR.  
24 ---------------------------------------------------------------------------------------------------------------------------------------------
25 ### Portal logging deployment for sub-module portal-db
26 -------------------------------------------------------------------------------------------------
27   1. Log provider file is available at the path, /opt/apache-tomcat-8.0.37/webapps/ECOMPDBCAPP/WEB-INF/classes, in the container.
28   2. Copy the canonical logback.xml from 'portal-db' directory (of gerrit) into the path mentioned in step 1.
29   3. Create the canonical path for logs, /var/log/onap/portal/portal-db on the host VM.
30   4. Provide write permissions for "others" users for directory created in step 3.
31   5. Volume-Mount: The portal container requires one host path mapped as volume in the container
32         
33       5.1. Log file path:
34         Host path -      /var/log/onap/portal/portal-db/ mapped to 
35         Container path - /var/log/onap/portal/portal-db/
36         This is done so that the log files are also visible in the VM and then to the filebeat.
37       5.2. Log provider file path:              
38         Note: Log provider path cannot be configured externally as it is bundled inside a WAR.
39 ##############################################################################################################################################