docs/docs-core/src/main/java/com/sismics/util/logback/LogCriteria.java

55 lines
986 B
Java
Raw Normal View History

2023-04-12 12:16:04 +02:00
package com.sismics.util.logback;
2013-07-27 18:33:20 +02:00
2023-04-12 12:16:04 +02:00
import ch.qos.logback.classic.Level;
2023-03-19 14:28:22 +01:00
import org.apache.commons.lang3.StringUtils;
2013-07-27 18:33:20 +02:00
/**
* Log search criteria.
*
* @author jtremeaux
*/
public class LogCriteria {
/**
* Minimum logging level (DEBUG, WARN)...
2013-07-27 18:33:20 +02:00
*/
private Level minLevel;
2013-07-27 18:33:20 +02:00
/**
* Logger name / tag.
*/
private String tag;
/**
* Message logged.
*/
private String message;
public Level getMinLevel() {
return minLevel;
2013-07-27 18:33:20 +02:00
}
public LogCriteria setMinLevel(Level level) {
this.minLevel = level;
return this;
2013-07-27 18:33:20 +02:00
}
public String getTag() {
return tag;
}
public LogCriteria setTag(String tag) {
2013-07-27 18:33:20 +02:00
this.tag = StringUtils.lowerCase(tag);
return this;
2013-07-27 18:33:20 +02:00
}
public String getMessage() {
return message;
}
public LogCriteria setMessage(String message) {
2013-07-27 18:33:20 +02:00
this.message = StringUtils.lowerCase(message);
return this;
2013-07-27 18:33:20 +02:00
}
}