diff options
author | Vitaly Takmazov | 2022-12-08 04:37:02 +0000 |
---|---|---|
committer | Vitaly Takmazov | 2022-12-08 04:37:02 +0000 |
commit | b91a6a09b5661f34d296cf40f2ff3fc58b2b3bf2 (patch) | |
tree | 13abdc26c76e9ee79d31b5843f3704b04a905440 /src/main | |
parent | 3a10067e6590699f2ee6e0dbbd24c66e40505833 (diff) |
Add production logging configuration
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/resources/logback-spring.xml | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 00000000..5e2fd704 --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration> + <include resource="org/springframework/boot/logging/logback/defaults.xml"/> + <property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}server.log}"/> + <include resource="org/springframework/boot/logging/logback/file-appender.xml" /> + <root level="INFO"> + <appender-ref ref="FILE" /> + </root> + <appender name="XMPP" class="ch.qos.logback.core.FileAppender"> + <file>${LOG_PATH}/xmpp.log</file> + <append>true</append> + <encoder> + <pattern>%d{yyyy-MM-dd HH:mm:ss} %logger{36} - %msg%n</pattern> + </encoder> + </appender> + <appender name="Session" class="ch.qos.logback.core.FileAppender"> + <file>${LOG_PATH}/session.log</file> + <append>true</append> + <encoder> + <pattern>%d{yyyy-MM-dd HH:mm:ss} %logger{36} - %msg%n</pattern> + </encoder> + </appender> + <appender name="Telegram" class="ch.qos.logback.core.FileAppender"> + <file>${LOG_PATH}/durov.log</file> + <append>true</append> + <encoder> + <pattern>%d{yyyy-MM-dd HH:mm:ss} %logger{36} - %msg%n</pattern> + </encoder> + </appender> + <appender name="ActivityPub" class="ch.qos.logback.core.FileAppender"> + <file>${LOG_PATH}/activity.log</file> + <append>true</append> + <encoder> + <pattern>%d{yyyy-MM-dd HH:mm:ss} %logger{36} - %msg%n</pattern> + </encoder> + </appender> + <logger name="XMPP" level="DEBUG" additivity="false"> + <appender-ref ref="XMPP" /> + </logger> + <logger name="Session" level="DEBUG" additivity="false"> + <appender-ref ref="Session" /> + </logger> + <logger name="Telegram" level="DEBUG" additivity="false"> + <appender-ref ref="Telegram" /> + </logger> + <logger name="ActivityPub" level="DEBUG" additivity="false"> + <appender-ref ref="ActivityPub" /> + </logger> +</configuration> |