diff options
author | Keguang He <hekeguang@chinamobile.com> | 2022-08-17 06:15:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-08-17 06:15:51 +0000 |
commit | fbcbae461a0ba9d28f92cb26fadd59805429aaa7 (patch) | |
tree | dffa9424d7532fd593b6082c3ce51f63a080b421 /intentanalysis/src/main | |
parent | a5038f38bdce4137583338e59a419690c6cffd52 (diff) | |
parent | 95277d1115bb5ec27aa282bfe994dbc586abb5c0 (diff) |
Merge "Add log file"
Diffstat (limited to 'intentanalysis/src/main')
-rw-r--r-- | intentanalysis/src/main/resources/logback.xml | 36 |
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 |