#Configuration
Log configuration log4j2-spring.xml, just add the corresponding file appender, such as:
<properties>
<property name="APP_NAME">fizz-gateway</property>
<property name="LOG_DIR">/log</property>
</properties>
<Appenders>
<RollingRandomAccessFile name="RollingFile" fileName="${LOG_DIR}/${APP_NAME}.log" filePattern="${LOG_DIR}/$${date:yyyy-MM-dd}/${APP_NAME}-%d{ HH}-%i.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %t %-5level [%c{1}.%M:%L] %msg{nolookups}%n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1"/>
<SizeBasedTriggeringPolicy size="10MB"/>
</Policies>
<DefaultRolloverStrategy max="50"/>
</RollingRandomAccessFile>
</Appenders>
fileName: The storage directory and name of the current log file
interval: how often to archive and generate new log files, configured as 1 hour
size: When the log file reaches x size, archive and generate a new log file, configured as 10m
max: The maximum number of log files to archive, configured as 50
filePattern: File naming format when archiving log files, %d{HH} is the hour, %i is the file serial number
# FizzGate integrated platform introduction
FizzGate is a microservice aggregation gateway developed based on Java. It can achieve hot service orchestration and aggregation, automatic authorization selection, online service script coding, online testing, high-performance routing, API audit management, callback management, etc., and has powerful customization The plug-in system can be expanded by itself and provides a friendly graphical configuration interface, which can quickly help enterprises manage API services, reduce middle-layer glue codes, reduce coding investment, and improve the stability and security of API services.
Official website: https://www.fizzgate.com (opens new window)
GitHub: https://github.com/fizzgate/fizz-gateway-node (opens new window)
Code cloud: https://gitee.com/fizzgate/fizz-gateway (opens new window)
Getting Started Tutorial: https://www.fizzgate.com/fizz/guide/GettingStarted/ (opens new window)
Advanced tutorial: https://www.fizzgate.com/fizz/guide/advanced/ (opens new window)
Author: lancer