-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CDR file only created when openvidu.cdr thanks to conditional logback…
….xml
- Loading branch information
1 parent
1182fec
commit e9110c5
Showing
5 changed files
with
57 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Required metadata | ||
sonar.projectKey=java-sonar-runner-simple | ||
sonar.projectName=Sonar OpenVidu Server | ||
sonar.projectVersion=1.0 | ||
|
||
# Comma-separated paths to directories with sources (required) | ||
sonar.sources=src | ||
|
||
# Language | ||
sonar.language=java | ||
|
||
# Encoding of the source files | ||
sonar.sourceEncoding=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,42 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<timestamp key="myTimestamp" timeReference="contextBirth" datePattern="HH-mm-ss"/> | ||
<timestamp key="myTimestamp" timeReference="contextBirth" | ||
datePattern="HH-mm-ss" /> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<layout class="ch.qos.logback.classic.PatternLayout"> | ||
<Pattern>[%p] %d [%.12t] %c \(%M\) - %msg%n</Pattern> | ||
</layout> | ||
</appender> | ||
<appender name="CDR" | ||
class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<FileNamePattern>log/CDR.%d{yyyy-MM-dd}_${myTimestamp}.log</FileNamePattern> | ||
<MaxHistory>30</MaxHistory> | ||
<TotalSizeCap>20GB</TotalSizeCap> | ||
</rollingPolicy> | ||
<layout> | ||
<pattern>%m\n</pattern> | ||
</layout> | ||
</appender> | ||
<logger name="io.openvidu.server.cdr.CallDetailRecord"> | ||
<level value="INFO" /> | ||
<appender-ref ref="CDR" /> | ||
</logger> | ||
<root> | ||
<level value="INFO" /> | ||
<appender-ref ref="STDOUT" /> | ||
</root> | ||
<if condition='property("spring.profiles.active").contains("ngrok")'> | ||
<then> | ||
<property scope="context" resource="application-ngrok.properties" /> | ||
</then> | ||
<else> | ||
<property scope="context" resource="application.properties" /> | ||
</else> | ||
</if> | ||
<if condition='property("openvidu.cdr").contains("true")'> | ||
<then> | ||
<appender name="CDR" | ||
class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<FileNamePattern>log/CDR.%d{yyyy-MM-dd}_${myTimestamp}.log | ||
</FileNamePattern> | ||
<MaxHistory>30</MaxHistory> | ||
<TotalSizeCap>20GB</TotalSizeCap> | ||
</rollingPolicy> | ||
<layout> | ||
<pattern>%m\n</pattern> | ||
</layout> | ||
</appender> | ||
<logger name="io.openvidu.server.cdr.CallDetailRecord"> | ||
<level value="INFO" /> | ||
<appender-ref ref="CDR" /> | ||
</logger> | ||
</then> | ||
</if> | ||
</configuration> |