summaryrefslogtreecommitdiffstats
path: root/intentanalysis/src
diff options
context:
space:
mode:
authorzhuguanyu <zhuguanyu5@huawei.com>2022-08-11 17:39:41 +0800
committerzhuguanyu <zhuguanyu5@huawei.com>2022-08-11 17:41:13 +0800
commit95277d1115bb5ec27aa282bfe994dbc586abb5c0 (patch)
tree3f34abb49410546fbb53dcf45032d80d65c0b1df /intentanalysis/src
parente1bb026dc18d66bb3a0417625c8dfb32a1109bee (diff)
Add log file
Issue-ID: USECASEUI-708 Signed-off-by: zhuguanyu <zhuguanyu5@huawei.com> Change-Id: I320a336bfbd5084d0d3a6bbc342672168218f320
Diffstat (limited to 'intentanalysis/src')
-rw-r--r--intentanalysis/src/main/resources/logback.xml36
1 files changed, 34 insertions, 2 deletions
diff --git a/intentanalysis/src/main/resources/logback.xml b/intentanalysis/src/main/resources/logback.xml
index dc4d415..3198324 100644
--- a/intentanalysis/src/main/resources/logback.xml
+++ b/intentanalysis/src/main/resources/logback.xml
@@ -12,13 +12,45 @@
limitations under the License.
-->
<configuration>
- <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<Target>System.out</Target>
+ <!-- encoders are assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss:SSS} %5p ${PID} --- [%15.15t] %-40.40c{40} : %m%n</pattern>
</encoder>
</appender>
+
+ <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+ <file>/var/log/usecaseui/intent-analysis/ERROR.log</file>
+ <append>true</append>
+ <!-- set immediateFlush to false for much higher logging throughput -->
+ <immediateFlush>true</immediateFlush>
+ <encoder>
+ <pattern>%d{yyyy-MM-dd HH:mm:ss:SSS} %5p ${PID} --- [%15.15t] %-40.40c{40} : %m%n</pattern>
+ </encoder>
+ </appender>
+ <appender name="ROLLING-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>/var/log/usecaseui/intent-analysis/%d{yyyy-MM}-DEBUG.log</fileNamePattern>
+ <maxHistory>90</maxHistory>
+ <totalSizeCap>3GB</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>>%d{yyyy-MM-dd HH:mm:ss:SSS} %5p ${PID} --- [%15.15t] %-40.40c{40} : %m%n</pattern>
+ </encoder>
+ </appender>
+
+ <logger name="org.onap.usecaseui.intentanalysis" level="error">
+ <appender-ref ref="FILE" />
+ </logger>
+
+ <logger name="org.onap.usecaseui.intentanalysis" level="debug">
+ <appender-ref ref="ROLLING-FILE" />
+ </logger>
+
<root level="info">
- <appender-ref ref="stdout"/>
+ <appender-ref ref="STDOUT"/>
</root>
+
</configuration> \ No newline at end of file