Java Code Examples for org.apache.logging.log4j.core.config.builder.api.ComponentBuilder#addAttribute()
The following examples show how to use
org.apache.logging.log4j.core.config.builder.api.ComponentBuilder#addAttribute() .
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: Log4j1ConfigurationParser.java From logging-log4j2 with Apache License 2.0 | 5 votes |
private void buildAttribute(final String componentName, final ComponentBuilder componentBuilder, final String sourceAttributeName, final String targetAttributeName) { final String attributeValue = getLog4jAppenderValue(componentName, sourceAttributeName); if (attributeValue != null) { componentBuilder.addAttribute(targetAttributeName, attributeValue); } }
Example 2
Source File: Log4j1ConfigurationParser.java From logging-log4j2 with Apache License 2.0 | 5 votes |
private void buildMandatoryAttribute(final String componentName, final ComponentBuilder componentBuilder, final String sourceAttributeName, final String targetAttributeName) { final String attributeValue = getLog4jAppenderValue(componentName, sourceAttributeName); if (attributeValue != null) { componentBuilder.addAttribute(targetAttributeName, attributeValue); } else { reportWarning("Missing " + sourceAttributeName + " for " + componentName); } }
Example 3
Source File: Log4j1ConfigurationParser.java From logging-log4j2 with Apache License 2.0 | 5 votes |
private void buildAttribute(final String componentName, final ComponentBuilder componentBuilder, final String sourceAttributeName, final String targetAttributeName) { final String attributeValue = getLog4jAppenderValue(componentName, sourceAttributeName); if (attributeValue != null) { componentBuilder.addAttribute(targetAttributeName, attributeValue); } }
Example 4
Source File: Log4j1ConfigurationParser.java From logging-log4j2 with Apache License 2.0 | 5 votes |
private void buildMandatoryAttribute(final String componentName, final ComponentBuilder componentBuilder, final String sourceAttributeName, final String targetAttributeName) { final String attributeValue = getLog4jAppenderValue(componentName, sourceAttributeName); if (attributeValue != null) { componentBuilder.addAttribute(targetAttributeName, attributeValue); } else { reportWarning("Missing " + sourceAttributeName + " for " + componentName); } }
Example 5
Source File: Log4j1ConfigurationParser.java From logging-log4j2 with Apache License 2.0 | 4 votes |
private void buildAttributeWithDefault(final String componentName, final ComponentBuilder componentBuilder, final String sourceAttributeName, final String targetAttributeName, final String defaultValue) { final String attributeValue = getLog4jAppenderValue(componentName, sourceAttributeName, defaultValue); componentBuilder.addAttribute(targetAttributeName, attributeValue); }
Example 6
Source File: Log4j1ConfigurationParser.java From logging-log4j2 with Apache License 2.0 | 4 votes |
private void buildAttributeWithDefault(final String componentName, final ComponentBuilder componentBuilder, final String sourceAttributeName, final String targetAttributeName, final String defaultValue) { final String attributeValue = getLog4jAppenderValue(componentName, sourceAttributeName, defaultValue); componentBuilder.addAttribute(targetAttributeName, attributeValue); }