diff options
-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 |