+ up
This commit is contained in:
22
src/main/resources/config.json
Normal file
22
src/main/resources/config.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"server": {
|
||||
"port": 8080,
|
||||
"host": "0.0.0.0"
|
||||
},
|
||||
"database": {
|
||||
"host": "localhost",
|
||||
"port": 3306,
|
||||
"user": "user",
|
||||
"password": "password",
|
||||
"database": "database",
|
||||
"connectionTimeout": 5000,
|
||||
"maxPoolSize": 8
|
||||
},
|
||||
"redis": {
|
||||
"host": "localhost",
|
||||
"port": 6379,
|
||||
"password": null,
|
||||
"maxPoolSize": 6,
|
||||
"maxWaitingHandlers": 6
|
||||
}
|
||||
}
|
||||
48
src/main/resources/log4j2.xml
Normal file
48
src/main/resources/log4j2.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="WARN" monitorInterval="60">
|
||||
<!-- Папка и имя приложения -->
|
||||
<Properties>
|
||||
<Property name="LOG_DIR">logs</Property>
|
||||
<Property name="APP_NAME">iiko-app</Property>
|
||||
</Properties>
|
||||
|
||||
<!-- Консоль -->
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" charset="UTF-8"/>
|
||||
</Console>
|
||||
|
||||
<!-- Основной rolling файл -->
|
||||
<RollingFile name="File"
|
||||
fileName="${LOG_DIR}/${APP_NAME}.log"
|
||||
filePattern="${LOG_DIR}/${APP_NAME}.%d{yyyy-MM-dd}.log.gz">
|
||||
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" charset="UTF-8"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="30" totalSizeCap="1GB"/>
|
||||
</RollingFile>
|
||||
|
||||
<!-- Файл только для ошибок -->
|
||||
<RollingFile name="ErrorFile"
|
||||
fileName="${LOG_DIR}/${APP_NAME}-error.log"
|
||||
filePattern="${LOG_DIR}/${APP_NAME}-error.%d{yyyy-MM-dd}.log.gz">
|
||||
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" charset="UTF-8"/>
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||
</Policies>
|
||||
<Filters>
|
||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
<DefaultRolloverStrategy max="30" totalSizeCap="500MB"/>
|
||||
</RollingFile>
|
||||
</Appenders>
|
||||
|
||||
<Loggers>
|
||||
<Root level="info">
|
||||
<AppenderRef ref="Console"/>
|
||||
<AppenderRef ref="File"/>
|
||||
<AppenderRef ref="ErrorFile"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
Reference in New Issue
Block a user