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

com.fastchar.systemtool.FastSystemToolConfig Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package com.fastchar.systemtool;

import com.fastchar.interfaces.IFastConfig;
import java.util.*;

/**
 * @author 沈建(Janesen)
 * @date 2021/6/3 16:01
 */
public class FastSystemToolConfig implements IFastConfig {

    private int logExceptionMaxKeepDay = 60;//系统异常日志最大保存的天数
    private int logActionRequestMaxKeepDay = 15;//系统请求的日志最大保存的天数
    private int logSqlMaxKeepDay = 15;//系统请求的日志最大保存的天数
    private int logHttpMaxKeepDay = 15;//系统HTTP请求的日志最大保存的天数
    private int logSeleniumMaxKeepDay = 15;//系统HTTP-Driver请求的日志最大保存的天数

    private final Set logActionRequestUrlPatterns = new HashSet<>();//需要记录拦截的地址匹配符

    private boolean logJob = true;//是否开启fastchar-job日志
    private boolean logActionRequest;//是否开启系统请求的日志记录
    private boolean logSql;//是否开启记录sql语句
    private boolean logHttp = true;//是否开启fastchar-http日志
    private boolean logSelenium = true;//是否开启fastchar-selenium日志

    public int getLogExceptionMaxKeepDay() {
        return logExceptionMaxKeepDay;
    }

    public FastSystemToolConfig setLogExceptionMaxKeepDay(int logExceptionMaxKeepDay) {
        this.logExceptionMaxKeepDay = logExceptionMaxKeepDay;
        return this;
    }

    public int getLogActionRequestMaxKeepDay() {
        return logActionRequestMaxKeepDay;
    }

    public FastSystemToolConfig setLogActionRequestMaxKeepDay(int logActionRequestMaxKeepDay) {
        this.logActionRequestMaxKeepDay = logActionRequestMaxKeepDay;
        return this;
    }

    public Set getLogActionRequestUrlPatterns() {
        return logActionRequestUrlPatterns;
    }

    public FastSystemToolConfig addLogActionRequestUrlPattern(String logActionRequestUrlPattern) {
        this.logActionRequestUrlPatterns.add(logActionRequestUrlPattern);
        return this;
    }

    public boolean isLogActionRequest() {
        return logActionRequest;
    }

    public FastSystemToolConfig setLogActionRequest(boolean logActionRequest) {
        this.logActionRequest = logActionRequest;
        return this;
    }

    public boolean isLogSql() {
        return logSql;
    }

    public FastSystemToolConfig setLogSql(boolean logSql) {
        this.logSql = logSql;
        return this;
    }

    public int getLogSqlMaxKeepDay() {
        return logSqlMaxKeepDay;
    }

    public FastSystemToolConfig setLogSqlMaxKeepDay(int logSqlMaxKeepDay) {
        this.logSqlMaxKeepDay = logSqlMaxKeepDay;
        return this;
    }

    public boolean isLogHttp() {
        return logHttp;
    }

    public FastSystemToolConfig setLogHttp(boolean logHttp) {
        this.logHttp = logHttp;
        return this;
    }

    public boolean isLogJob() {
        return logJob;
    }

    public FastSystemToolConfig setLogJob(boolean logJob) {
        this.logJob = logJob;
        return this;
    }

    public int getLogHttpMaxKeepDay() {
        return logHttpMaxKeepDay;
    }

    public FastSystemToolConfig setLogHttpMaxKeepDay(int logHttpMaxKeepDay) {
        this.logHttpMaxKeepDay = logHttpMaxKeepDay;
        return this;
    }

    public boolean isLogSelenium() {
        return logSelenium;
    }

    public FastSystemToolConfig setLogSelenium(boolean logSelenium) {
        this.logSelenium = logSelenium;
        return this;
    }

    public int getLogSeleniumMaxKeepDay() {
        return logSeleniumMaxKeepDay;
    }

    public FastSystemToolConfig setLogSeleniumMaxKeepDay(int logSeleniumMaxKeepDay) {
        this.logSeleniumMaxKeepDay = logSeleniumMaxKeepDay;
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy