org.wildfly.swarm.config.logging.Logger Maven / Gradle / Ivy
package org.wildfly.swarm.config.logging;
import org.wildfly.config.runtime.Implicit;
import org.wildfly.config.runtime.ResourceType;
import org.wildfly.config.runtime.ModelNodeBinding;
import java.util.List;
/**
* Defines a logger category.
*/
@ResourceType("logger")
public class Logger {
private String key;
private String category;
private String filterSpec;
private List handlers;
private String level;
private Boolean useParentHandlers;
public Logger(String key) {
this.key = key;
}
public String getKey() {
return this.key;
}
/**
* Specifies the category for the logger.
*/
@ModelNodeBinding(detypedName = "category")
public String category() {
return this.category;
}
/**
* Specifies the category for the logger.
*/
@SuppressWarnings("unchecked")
public Logger category(String value) {
this.category = value;
return (Logger) this;
}
/**
* A filter expression value to define a filter. Example for a filter that does not match a pattern: not(match("JBAS.*"))
*/
@ModelNodeBinding(detypedName = "filter-spec")
public String filterSpec() {
return this.filterSpec;
}
/**
* A filter expression value to define a filter. Example for a filter that does not match a pattern: not(match("JBAS.*"))
*/
@SuppressWarnings("unchecked")
public Logger filterSpec(String value) {
this.filterSpec = value;
return (Logger) this;
}
/**
* The handlers associated with the logger.
*/
@ModelNodeBinding(detypedName = "handlers")
public List handlers() {
return this.handlers;
}
/**
* The handlers associated with the logger.
*/
@SuppressWarnings("unchecked")
public Logger handlers(List value) {
this.handlers = value;
return (Logger) this;
}
/**
* The log level specifying which message levels will be logged by the logger. Message levels lower than this value will be discarded.
*/
@ModelNodeBinding(detypedName = "level")
public String level() {
return this.level;
}
/**
* The log level specifying which message levels will be logged by the logger. Message levels lower than this value will be discarded.
*/
@SuppressWarnings("unchecked")
public Logger level(String value) {
this.level = value;
return (Logger) this;
}
/**
* Specifies whether or not this logger should send its output to it's parent Logger.
*/
@ModelNodeBinding(detypedName = "use-parent-handlers")
public Boolean useParentHandlers() {
return this.useParentHandlers;
}
/**
* Specifies whether or not this logger should send its output to it's parent Logger.
*/
@SuppressWarnings("unchecked")
public Logger useParentHandlers(Boolean value) {
this.useParentHandlers = value;
return (Logger) this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy