summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorPawelSzalapski <pawel.szalapski@nokia.com>2018-07-10 13:25:18 +0200
committerPawelSzalapski <pawel.szalapski@nokia.com>2018-07-13 12:31:07 +0200
commitb343343f1efd0df9196b27e9e65b783e5e954112 (patch)
treee19094ffbbd8c2a1616ed99983a95c32cac0343b /etc
parentcd66181b35300f020f197bb411d6bdf6ad2514fb (diff)
Clean up .sh scripts
Removed .sh scripts that are not needed. Fill readme with a description of some of the things that might be not visible at first glance Refactor .sh scripts, remove not used or not needed parts Fix a bug where pidof <package> does not work. Change logging of the scripts and they way that app is run so that the logs are in one place -> collector.logs Fixed a bug where tomcat startup problems are not logged Added log rotation with logrotate tool Change-Id: I156328ab23d18a20072177ae8c5420772c3e2c7c Signed-off-by: PawelSzalapski <pawel.szalapski@nokia.com> Issue-ID: DCAEGEN2-610
Diffstat (limited to 'etc')
-rw-r--r--etc/log4j.xml30
-rw-r--r--etc/logrotate.conf7
2 files changed, 12 insertions, 25 deletions
diff --git a/etc/log4j.xml b/etc/log4j.xml
index baf03559..460004c6 100644
--- a/etc/log4j.xml
+++ b/etc/log4j.xml
@@ -27,18 +27,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="threshold" value="INFO" />
<layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%-10t]%m%n" />
- </layout>
- </appender>
-
- <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
- <param name="threshold" value="INFO" />
- <param name="File" value="logs/collector.log" />
- <param name="MaxFileSize" value="32MB"/>
- <param name="MaxBackupIndex" value="20"/>
- <layout class="org.apache.log4j.PatternLayout">
- <!-- param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%-10t][%-5c][%4L]%m%n" / -->
- <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%-10t][%-5c]%m%n" />
+ <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%-10t][%c] - %m%n"/>
</layout>
</appender>
@@ -48,7 +37,6 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<param name="MaxFileSize" value="32MB"/>
<param name="MaxBackupIndex" value="10"/>
<layout class="org.apache.log4j.PatternLayout">
- <!-- param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%-10t][%-5c][%4L]%m%n" / -->
<param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%-10t][%-5c]%m%n" />
</layout>
</appender>
@@ -59,33 +47,30 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<param name="MaxFileSize" value="32MB"/>
<param name="MaxBackupIndex" value="10"/>
<layout class="org.apache.log4j.PatternLayout">
- <!-- param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%-10t][%-5c][%4L]%m%n" / -->
<param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%-10t][%-5c]%m%n" />
</layout>
</appender>
-
+
<appender name="EFILE" class="org.apache.log4j.RollingFileAppender">
<param name="threshold" value="INFO" />
<param name="File" value="logs/error.log" />
<param name="MaxFileSize" value="32MB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
- <!-- param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%-10t][%-5c][%4L]%m%n" / -->
<param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%-10t][%-5c]%m%n" />
</layout>
</appender>
-
+
<!--
ECOMP logging setup
-
+
NOTES:
-
+
1. files are written to "./logs/<filename>". You must setup the environment
so that ./logs is a symlink to the correct location according to the ECOMP
log standard. For example, "/opt/logs/DCAE/highlandParkVcScope". If that's
not possible, change the File setting in each appender appropriately.
-->
-
<appender name="ECOMP_AUDIT" class="org.apache.log4j.RollingFileAppender">
<param name="threshold" value="DEBUG" />
<param name="File" value="./logs/ecomp/audit.log" />
@@ -165,25 +150,20 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<logger name="org.onap.dcae.commonFunction.EventPublisher" additivity="false">
<level value="debug"/>
<appender-ref ref="CONSOLE" />
- <appender-ref ref="FILE" />
</logger>
-
<logger name="com.att.nsa.apiClient.http.HttpClient" additivity="false">
<level value="info"/>
- <appender-ref ref="FILE" />
<appender-ref ref="CONSOLE" />
</logger>
<logger name="com.att.nsa.cambria.client.impl.CambriaSimplerBatchPublisher" additivity="false">
<level value="info"/>
- <appender-ref ref="FILE" />
<appender-ref ref="CONSOLE" />
</logger>
<root>
<level value="DEBUG" />
- <appender-ref ref="FILE" />
<appender-ref ref="CONSOLE" />
<appender-ref ref="ECOMP_AUDIT" />
<appender-ref ref="ECOMP_DEBUG" />
diff --git a/etc/logrotate.conf b/etc/logrotate.conf
new file mode 100644
index 00000000..41bf4edc
--- /dev/null
+++ b/etc/logrotate.conf
@@ -0,0 +1,7 @@
+/opt/app/VESCollector/logs/collector.log {
+ size 64M
+ rotate 10
+ copytruncate
+ dateext
+ dateformat .%Y-%m-%dT%H:%M:%S
+} \ No newline at end of file