org.apache.logging.log4j.spring.boot.Log4jJdbcProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of log4j2-plus-spring-boot-starter Show documentation
Show all versions of log4j2-plus-spring-boot-starter Show documentation
Spring Boot Starter For Log4j 2.x
package org.apache.logging.log4j.spring.boot;
import java.util.ArrayList;
import java.util.List;
import org.apache.logging.log4j.spring.boot.ext.Log4jJdbcAppenderProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
*/
@ConfigurationProperties(Log4jJdbcProperties.PREFIX)
public class Log4jJdbcProperties {
public static final String PREFIX = "logging.log4j.jdbc";
/**
* Whether use current Context. if false the LoggerContext appropriate for the
* caller of this method is returned. For example, in a web application if the
* caller is a class in WEB-INF/lib then one LoggerContext may be returned and
* if the caller is a class in the container's classpath then a different
* LoggerContext may be returned. If true then only a single LoggerContext will
* be returned.
**/
private boolean currentContext = false;
/**
* Whether to enable log4j jdbc.
*/
private boolean enabled = true;
/**
* Whether to use distributed database middleware .
*/
private boolean shardingJdbc = false;
private List appenders = new ArrayList();
public boolean isCurrentContext() {
return currentContext;
}
public void setCurrentContext(boolean currentContext) {
this.currentContext = currentContext;
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public boolean isShardingJdbc() {
return shardingJdbc;
}
public void setShardingJdbc(boolean shardingJdbc) {
this.shardingJdbc = shardingJdbc;
}
public List getAppenders() {
return appenders;
}
public void setAppenders(List appenders) {
this.appenders = appenders;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy