package cn.meowrain.aioj.backend.framework.log.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

@Getter
@Setter
@ConfigurationProperties(AIOJLogPropertiesConfiguration.PREFIX)
public class AIOJLogPropertiesConfiguration {

	public static final String PREFIX = "aioj.log";

	/**
	 * 开启日志记录
	 */
	private boolean enabled = true;

	/**
	 * 请求报文最大存储长度
	 */
	private Integer maxLength = 20000;

	/**
	 * 放行字段，password,mobile,idcard,phone
	 */
	@Value("${log.exclude-fields:password,mobile,idcard,phone}")
	private List<String> excludeFields;

}
