forked from WebEducationPlatform/CRM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
logback.xml
167 lines (144 loc) · 6.76 KB
/
logback.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="STD_OUT_PATTERN"
value="%cyan(%d{dd-MM-yyyy HH:mm:ss.SSS}) %magenta([%-20thread]) %highlight(!%-5level!) %yellow('%logger{36}.%M'): %boldWhite%(%msg%n)"/>
<property name="FILE_OUT_PATTERN"
value="%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] !%-5level! '%logger{36}.%M': %msg%n"/>
<property name="LOG_DIR_NEW" value="LOG_NEW"/>
<timestamp key="byDay" datePattern="yyyy-MM-dd"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${STD_OUT_PATTERN}</pattern>
</encoder>
</appender>
<appender name="ALL_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR_NEW}\all_log\currentLog.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR_NEW}\all_log\log_%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>15</maxHistory>
<totalSizeCap>2GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>${FILE_OUT_PATTERN}</pattern>
</encoder>
</appender>
<appender name="TELEGRAM_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR_NEW}\telegram_log\telegram.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR_NEW}\telegram_log\log_telegram_%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>15</maxHistory>
<totalSizeCap>2GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>${FILE_OUT_PATTERN}</pattern>
</encoder>
</appender>
<appender name="SHEDULE_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR_NEW}\shedule_log\shedule.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR_NEW}\shedule_log\log_shedule_%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>15</maxHistory>
<totalSizeCap>2GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>${FILE_OUT_PATTERN}</pattern>
</encoder>
</appender>
<appender name="VK_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR_NEW}\vk_log\vk.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR_NEW}\vk_log\log_vk_%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>15</maxHistory>
<totalSizeCap>2GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>${FILE_OUT_PATTERN}</pattern>
</encoder>
</appender>
<appender name="SMS_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR_NEW}\sms_log\sms.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR_NEW}\sms_log\log_sms_%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>15</maxHistory>
<totalSizeCap>2GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>${FILE_OUT_PATTERN}</pattern>
</encoder>
</appender>
<appender name="SLACK_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR_NEW}\slack_log\slack.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR_NEW}\slack_log\log_slack_%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>15</maxHistory>
<totalSizeCap>2GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>${FILE_OUT_PATTERN}</pattern>
</encoder>
</appender>
<logger name="com.ewp.crm.controllers" level="ALL" additivity="false">
<appender-ref ref="ALL_LOG"/>
<appender-ref ref="STDOUT"/>
</logger>
<logger name="com.ewp.crm.security.handlers" level="ALL" additivity="false">
<appender-ref ref="ALL_LOG"/>
<appender-ref ref="STDOUT"/>
</logger>
<logger name="com.ewp.crm.service" level="ERROR" additivity="false">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ALL_LOG"/>
</logger>
<logger name="com.ewp.crm.component" level="ALL" additivity="false">
<appender-ref ref="SHEDULE_LOG"/>
</logger>
<logger name="com.ewp.crm.service.impl.TelegramServiceImpl" level="ALL" additivity="false">
<appender-ref ref="TELEGRAM_LOG"/>
</logger>
<logger name="com.ewp.crm.service.impl.VKServiceImpl" level="ALL" additivity="false">
<appender-ref ref="VK_LOG"/>
</logger>
<logger name="com.ewp.crm.service.interfaces.VKService" level="ALL" additivity="false">
<appender-ref ref="VK_LOG"/>
</logger>
<logger name="com.ewp.crm.service.impl.SMSServiceImpl" level="ALL" additivity="false">
<appender-ref ref="SMS_LOG"/>
</logger>
<logger name="com.ewp.crm.service.slack.SlackServiceImpl" level="ALL" additivity="false">
<appender-ref ref="SLACK_LOG"/>
</logger>
<!--логи для hibernate. При необходимости установить уровень DEBUG-->
<!--что бы не мешались остальные логгеры можно поставить уровень OFF-->
<logger name="org.hibernate" level="OFF" additivity="false">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ALL_LOG"/>
</logger>
<logger name="org.hibernate.SQL" level="OFF" additivity="false">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ALL_LOG"/>
</logger>
<logger name="org.hibernate.type.descriptor" level="OFF" additivity="false">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ALL_LOG"/>
</logger>
<logger name="org.thymeleaf" level="DEBUG" additivity="false"/>
<root level="INFO">
<appender-ref ref="STDOUT"/>
</root>
<appender name="stash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>127.0.0.1:5000</destination>
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
<includeCallerData>true</includeCallerData>
<customFields>{"appname":"CRM"}</customFields>
</encoder>
</appender>
<root level="ALL">
<appender-ref ref="stash"/>
</root>
</configuration>