summaryrefslogtreecommitdiffstats
path: root/BRMSGateway/src/main
diff options
context:
space:
mode:
authorrb7147 <rb7147@att.com>2018-02-21 10:40:47 -0500
committerrb7147 <rb7147@att.com>2018-02-21 14:43:54 -0500
commit457910274afc5f0b66705c0b38380219fb178f3a (patch)
tree93fedc14903a8afe894a9141767abbfcf7820b48 /BRMSGateway/src/main
parent90d00371ecff702432203f7df882e0a8144ea43f (diff)
Updated the Policy Logging Pattern
Updated the logback.xml to save logs for 30 days. Issue-ID: POLICY-644 Change-Id: I578570fa5a7f86ba464c37cddab43a2fabcdae7f Signed-off-by: rb7147 <rb7147@att.com>
Diffstat (limited to 'BRMSGateway/src/main')
-rw-r--r--BRMSGateway/src/main/resources/logback.xml72
1 files changed, 33 insertions, 39 deletions
diff --git a/BRMSGateway/src/main/resources/logback.xml b/BRMSGateway/src/main/resources/logback.xml
index 3fa0a65c4..c01117ba7 100644
--- a/BRMSGateway/src/main/resources/logback.xml
+++ b/BRMSGateway/src/main/resources/logback.xml
@@ -2,7 +2,7 @@
============LICENSE_START=======================================================
ONAP Policy Engine
================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -113,16 +113,15 @@
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logDirectory}/${auditLogName}.log</file>
<rollingPolicy
- class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDirectory}/${auditLogName}.%i.log.zip
- </fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>9</maxIndex>
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
+
+ <!-- keep 30 days' worth of history capped at 3GB total size -->
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
</rollingPolicy>
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>5MB</maxFileSize>
- </triggeringPolicy>
+
<encoder>
<pattern>${defaultAuditPattern}</pattern>
</encoder>
@@ -140,19 +139,16 @@
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logDirectory}/${metricsLogName}.log</file>
<rollingPolicy
- class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDirectory}/${metricsLogName}.%i.log.zip
- </fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>9</maxIndex>
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
+
+ <!-- keep 30 days' worth of history capped at 3GB total size -->
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
</rollingPolicy>
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>5MB</maxFileSize>
- </triggeringPolicy>
+
<encoder>
- <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} -
- %msg%n"</pattern> -->
<pattern>${defaultMetricPattern}</pattern>
</encoder>
</appender>
@@ -169,19 +165,18 @@
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logDirectory}/${errorLogName}.log</file>
<rollingPolicy
- class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDirectory}/${errorLogName}.%i.log.zip
- </fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>9</maxIndex>
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
+
+ <!-- keep 30 days' worth of history capped at 3GB total size -->
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
</rollingPolicy>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>5MB</maxFileSize>
- </triggeringPolicy>
+
<encoder>
<pattern>${defaultErrorPattern}</pattern>
</encoder>
@@ -198,19 +193,18 @@
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${debugLogDirectory}/${debugLogName}.log</file>
<rollingPolicy
- class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${debugLogDirectory}/${debugLogName}.%i.log.zip
- </fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>9</maxIndex>
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${debugLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
+
+ <!-- keep 30 days' worth of history capped at 3GB total size -->
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
</rollingPolicy>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>DEBUG</level>
</filter>
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>5MB</maxFileSize>
- </triggeringPolicy>
+
<encoder>
<pattern>${debugLoggerPattern}</pattern>
</encoder>