Java Code Examples for ch.qos.logback.core.util.OptionHelper#isEmpty()

The following examples show how to use ch.qos.logback.core.util.OptionHelper#isEmpty() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SpringPropertyAction.java    From super-cloudops with Apache License 2.0 5 votes vote down vote up
@Override
public void begin(InterpretationContext ic, String elementName, Attributes attributes) throws ActionException {
	String name = attributes.getValue(NAME_ATTRIBUTE);
	String source = attributes.getValue(SOURCE_ATTRIBUTE);
	Scope scope = ActionUtil.stringToScope(attributes.getValue(SCOPE_ATTRIBUTE));
	String defaultValue = attributes.getValue(DEFAULT_VALUE_ATTRIBUTE);
	if (OptionHelper.isEmpty(name) || OptionHelper.isEmpty(source)) {
		addError("The \"name\" and \"source\" attributes of <springProperty> must be set");
	}
	ActionUtil.setProperty(ic, name, getValue(source, defaultValue), scope);
}
 
Example 2
Source File: KonkerStatusListenerConfigHelper.java    From konker-platform with Apache License 2.0 5 votes vote down vote up
static void installIfAsked(KonkerLoggerContext loggerContext) {
    String slClass = OptionHelper.getSystemProperty("logback.statusListenerClass");
    if(!OptionHelper.isEmpty(slClass)) {
        addStatusListener(loggerContext, slClass);
    }

}