zhangyeguang
2 weeks ago
11 changed files with 226 additions and 34 deletions
@ -0,0 +1,18 @@ |
|||||
|
spring: |
||||
|
datasource: |
||||
|
url: jdbc:mysql://101.34.243.138:7306/siliqua_recognition?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true |
||||
|
username: ams |
||||
|
password: ams@1234 |
||||
|
|
||||
|
|
||||
|
redis: |
||||
|
host: 192.168.10.111 |
||||
|
port: 6379 |
||||
|
email: |
||||
|
to: yeguangzhang@126.com |
||||
|
|
||||
|
recognition: |
||||
|
model: |
||||
|
url: http://api.camacloud.org.cn/recognition |
||||
|
|
||||
|
|
@ -0,0 +1,19 @@ |
|||||
|
spring: |
||||
|
datasource: |
||||
|
url: jdbc:mysql://192.168.1.232:3306/siliqua_recognition?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true |
||||
|
username: root |
||||
|
password: Njsszxs1! |
||||
|
|
||||
|
|
||||
|
redis: |
||||
|
host: 192.168.1.182 |
||||
|
port: 6379 |
||||
|
password: guwei2018 |
||||
|
email: |
||||
|
to: 120059323@qq.com |
||||
|
|
||||
|
recognition: |
||||
|
model: |
||||
|
url: http://localhost:9199 |
||||
|
|
||||
|
|
@ -0,0 +1,103 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<configuration> |
||||
|
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> |
||||
|
|
||||
|
<springProperty scope="context" name="springAppName" source="spring.application.name"/> |
||||
|
<!--<springProperty scope="context" name="serverIp" source="spring.cloud.client.hostname" />--> |
||||
|
<!-- Example for logging into the build folder of your project --> |
||||
|
<property name="LOG_FILE" value="log"/> |
||||
|
<property name="LOG_PATTERN" |
||||
|
value="%d{yyyy-MM-dd HH:mm:ss.SSS} %highlight(%.-5level) -- %X{traceId:-} -- [%10.10t] %cyan(%-36.36logger{32}) : %m%n"/> |
||||
|
|
||||
|
<!-- Appender to log to console --> |
||||
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> |
||||
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
||||
|
<!-- Minimum logging level to be presented in the console logs--> |
||||
|
<level>DEBUG</level> |
||||
|
</filter> |
||||
|
<encoder> |
||||
|
<pattern>${LOG_PATTERN}</pattern> |
||||
|
<charset>utf8</charset> |
||||
|
</encoder> |
||||
|
</appender> |
||||
|
|
||||
|
<!-- INFO日志 appender: 按照每天生成日志文件 --> |
||||
|
<appender name="INFO-APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
|
<!-- 写入的日志文件名,可以使相对目录也可以是绝对目录,如果上级目录不存在则自动创建 --> |
||||
|
<file>${LOG_FILE}/${springAppName}-info.log</file> |
||||
|
<!-- 如果为true表示日志被追加到文件结尾,如果是false表示清空文件 --> |
||||
|
<append>true</append> |
||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
||||
|
<!-- 日志文件输出的文件名: %d可以包含一个Java.text.SimpleDateFormat指定的时间格式 --> |
||||
|
<fileNamePattern>${LOG_FILE}/${springAppName}-info.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern> |
||||
|
<!-- 日志文件保存历史数量:控制保留的归档文件的最大数量,如果超出数量就删除旧文件 --> |
||||
|
<maxHistory>20</maxHistory> |
||||
|
<!-- 文件大小超过100MB归档 --> |
||||
|
<maxFileSize>100MB</maxFileSize> |
||||
|
</rollingPolicy> |
||||
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
||||
|
<pattern>${LOG_PATTERN}</pattern> |
||||
|
<charset>utf8</charset> |
||||
|
</encoder> |
||||
|
</appender> |
||||
|
<appender name="ASYNC-INFO-APPENDER" class="ch.qos.logback.classic.AsyncAppender"> |
||||
|
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --> |
||||
|
<discardingThreshold>0</discardingThreshold> |
||||
|
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --> |
||||
|
<queueSize>256</queueSize> |
||||
|
<!-- 添加附加的appender,最多只能添加一个 --> |
||||
|
<appender-ref ref="INFO-APPENDER"/> |
||||
|
</appender> |
||||
|
<!-- 错误日志 appender: 按照每天生成日志文件 --> |
||||
|
<appender name="ERROR-APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
|
<!-- 过滤器,只记录error级别的日志 --> |
||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
||||
|
<level>ERROR</level> |
||||
|
<onMatch>ACCEPT</onMatch> |
||||
|
<onMismatch>DENY</onMismatch> |
||||
|
</filter> |
||||
|
<!-- 日志名称 --> |
||||
|
<file>${LOG_FILE}/${springAppName}-error.log</file> |
||||
|
<append>true</append> |
||||
|
<!-- 每天生成一个日志文件,保存30天的日志文件 --> |
||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
||||
|
<!-- 日志文件输出的文件名:按天回滚 daily --> |
||||
|
<fileNamePattern>${LOG_FILE}/${springAppName}-error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern> |
||||
|
<!-- 日志文件保留天数 --> |
||||
|
<maxHistory>20</maxHistory> |
||||
|
<!-- 文件大小超过100MB归档 --> |
||||
|
<maxFileSize>100MB</maxFileSize> |
||||
|
</rollingPolicy> |
||||
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
||||
|
<pattern>${LOG_PATTERN}</pattern> |
||||
|
<charset>utf8</charset> |
||||
|
</encoder> |
||||
|
</appender> |
||||
|
<appender name="ASYNC-ERROR-APPENDER" class="ch.qos.logback.classic.AsyncAppender"> |
||||
|
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --> |
||||
|
<discardingThreshold>0</discardingThreshold> |
||||
|
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --> |
||||
|
<queueSize>256</queueSize> |
||||
|
<!-- 添加附加的appender,最多只能添加一个 --> |
||||
|
<appender-ref ref="ERROR-APPENDER"/> |
||||
|
</appender> |
||||
|
|
||||
|
<logger name="com.jiaguatech.oper.mapper" level="DEBUG"> |
||||
|
<appender-ref ref="console"/> |
||||
|
<appender-ref ref="ASYNC-INFO-APPENDER"/> |
||||
|
</logger> |
||||
|
|
||||
|
<root level="INFO"> |
||||
|
<appender-ref ref="console"/> |
||||
|
<appender-ref ref="ASYNC-INFO-APPENDER"/> |
||||
|
<appender-ref ref="ASYNC-ERROR-APPENDER"/> |
||||
|
</root> |
||||
|
|
||||
|
|
||||
|
<springProfile name="local"> |
||||
|
<root level="INFO"> |
||||
|
<appender-ref ref="console"/> |
||||
|
</root> |
||||
|
</springProfile> |
||||
|
|
||||
|
</configuration> |
Loading…
Reference in new issue