All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ideaaedi.log4j2.defender.properties.DefaultRegexProperties Maven / Gradle / Ivy

The newest version!
package com.ideaaedi.log4j2.defender.properties;

import com.ideaaedi.log4j2.defender.defender.DefaultRegexMessageDefender;
import com.ideaaedi.log4j2.defender.defender.Log4j2MessageDefender;
import com.ideaaedi.log4j2.defender.strategy.RegexDefenderStrategyProvider;
import org.apache.logging.log4j.core.LogEvent;

import java.util.ArrayList;
import java.util.List;

/**
 * 正则脱敏配置项
 *
 * @author JustryDeng
 * @since 2021/7/21 1:15:15
 */
public class DefaultRegexProperties {
    
    /**
     * 正则脱敏策略提供者
     */
    private RegexDefenderStrategyProvider strategyProvider;
    
    /**
     * 指定短路插件
     * 

* 当shortCircuitPlugins中存在{@link Log4j2MessageDefender#support(LogEvent)}匹配的插件时, * 使用该插件进行脱敏,而不用脱敏器进行脱敏 *

*/ private List shortCircuitPlugins = new ArrayList<>(); public RegexDefenderStrategyProvider getStrategyProvider() { return strategyProvider; } public void setStrategyProvider(RegexDefenderStrategyProvider strategyProvider) { this.strategyProvider = strategyProvider; } public List getShortCircuitPlugins() { return shortCircuitPlugins; } public void setShortCircuitPlugins(List shortCircuitPlugins) { this.shortCircuitPlugins = shortCircuitPlugins; } @Override public String toString() { return "DefaultRegexProperties{" + "strategyProvider=" + strategyProvider + '}'; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy