You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ni...@apache.org on 2013/07/20 23:16:46 UTC
svn commit: r1505209 [2/2] - in /logging/log4j/log4j2/trunk:
core/src/main/java/org/apache/logging/log4j/core/
core/src/main/java/org/apache/logging/log4j/core/appender/
core/src/main/java/org/apache/logging/log4j/core/appender/db/
core/src/main/java/o...
Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java Sat Jul 20 21:16:45 2013
@@ -28,6 +28,7 @@ import org.apache.logging.log4j.core.con
import org.apache.logging.log4j.core.config.plugins.PluginConfiguration;
import org.apache.logging.log4j.core.config.plugins.PluginElement;
import org.apache.logging.log4j.core.config.plugins.PluginFactory;
+import org.apache.logging.log4j.core.helpers.Booleans;
import org.apache.logging.log4j.core.helpers.Charsets;
import org.apache.logging.log4j.core.helpers.OptionConverter;
import org.apache.logging.log4j.core.pattern.LogEventPatternConverter;
@@ -92,7 +93,7 @@ public final class PatternLayout extends
private final RegexReplacement replace;
- private final boolean handleExceptions;
+ private final boolean alwaysWriteExceptions;
/**
* Constructs a EnhancedPatternLayout using the supplied conversion pattern.
@@ -101,18 +102,18 @@ public final class PatternLayout extends
* @param replace The regular expression to match.
* @param pattern conversion pattern.
* @param charset The character set.
- * @param handleExceptions Whether or not exceptions should always be handled in this pattern (if {@code true},
+ * @param alwaysWriteExceptions Whether or not exceptions should always be handled in this pattern (if {@code true},
* exceptions will be written even if the pattern does not specify so).
*/
private PatternLayout(final Configuration config, final RegexReplacement replace, final String pattern,
- final Charset charset, final boolean handleExceptions) {
+ final Charset charset, final boolean alwaysWriteExceptions) {
super(charset);
this.replace = replace;
this.conversionPattern = pattern;
this.config = config;
- this.handleExceptions = handleExceptions;
+ this.alwaysWriteExceptions = alwaysWriteExceptions;
final PatternParser parser = createPatternParser(config);
- formatters = parser.parse(pattern == null ? DEFAULT_CONVERSION_PATTERN : pattern, this.handleExceptions);
+ formatters = parser.parse(pattern == null ? DEFAULT_CONVERSION_PATTERN : pattern, this.alwaysWriteExceptions);
}
/**
@@ -128,7 +129,7 @@ public final class PatternLayout extends
return;
}
final PatternParser parser = createPatternParser(this.config);
- formatters = parser.parse(pattern, this.handleExceptions);
+ formatters = parser.parse(pattern, this.alwaysWriteExceptions);
}
public String getConversionPattern() {
@@ -202,8 +203,8 @@ public final class PatternLayout extends
* @param config The Configuration. Some Converters require access to the Interpolator.
* @param replace A Regex replacement String.
* @param charsetName The character set.
- * @param suppressExceptions Whether or not exceptions should be suppressed in this pattern (defaults to no, which
- * means exceptions will be written even if the pattern does not specify so).
+ * @param always If {@code "true"} (default) exceptions are always written even if the pattern contains no exception
+ * tokens.
* @return The PatternLayout.
*/
@PluginFactory
@@ -211,10 +212,11 @@ public final class PatternLayout extends
@PluginConfiguration final Configuration config,
@PluginElement("replace") final RegexReplacement replace,
@PluginAttr("charset") final String charsetName,
- @PluginAttr("suppressExceptions") final String suppressExceptions) {
+ @PluginAttr("alwaysWriteExceptions") final String always) {
final Charset charset = Charsets.getSupportedCharset(charsetName);
- final boolean handleExceptions = !Boolean.parseBoolean(suppressExceptions);
- return new PatternLayout(config, replace, pattern == null ? DEFAULT_CONVERSION_PATTERN : pattern, charset,
- handleExceptions);
+ final boolean alwaysWriteExceptions = Booleans.parseBoolean(always, true);
+ return new PatternLayout(
+ config, replace, pattern == null ? DEFAULT_CONVERSION_PATTERN : pattern, charset, alwaysWriteExceptions
+ );
}
}
Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java (original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java Sat Jul 20 21:16:45 2013
@@ -137,13 +137,11 @@ public final class PatternParser {
converterRules = converters;
}
-
public List<PatternFormatter> parse(final String pattern) {
return parse(pattern, false);
}
-
- public List<PatternFormatter> parse(final String pattern, final boolean handleExceptions) {
+ public List<PatternFormatter> parse(final String pattern, final boolean alwaysWriteExceptions) {
final List<PatternFormatter> list = new ArrayList<PatternFormatter>();
final List<PatternConverter> converters = new ArrayList<PatternConverter>();
final List<FormattingInfo> fields = new ArrayList<FormattingInfo>();
@@ -170,7 +168,7 @@ public final class PatternParser {
}
list.add(new PatternFormatter(pc, field));
}
- if (handleExceptions && !handlesExceptions) {
+ if (alwaysWriteExceptions && !handlesExceptions) {
final LogEventPatternConverter pc = ExtendedThrowablePatternConverter.newInstance(null);
list.add(new PatternFormatter(pc, FormattingInfo.getDefault()));
}
Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/InMemoryAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/InMemoryAppender.java?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/InMemoryAppender.java (original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/InMemoryAppender.java Sat Jul 20 21:16:45 2013
@@ -16,22 +16,22 @@
*/
package org.apache.logging.log4j.test.appender;
+import java.io.ByteArrayOutputStream;
+import java.io.Serializable;
+
import org.apache.logging.log4j.core.Layout;
import org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender;
import org.apache.logging.log4j.core.appender.OutputStreamManager;
import org.apache.logging.log4j.core.filter.CompositeFilter;
-import java.io.ByteArrayOutputStream;
-import java.io.Serializable;
-
/**
*
*/
public class InMemoryAppender<T extends Serializable> extends AbstractOutputStreamAppender<T> {
public InMemoryAppender(final String name, final Layout<T> layout, final CompositeFilter filters,
- final boolean handleException) {
- super(name, layout, filters, handleException, true, new InMemoryManager(name, layout));
+ final boolean ignoreExceptions) {
+ super(name, layout, filters, ignoreExceptions, true, new InMemoryManager(name, layout));
}
@Override
Modified: logging/log4j/log4j2/trunk/core/src/test/resources/FlumeFuncTest.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/FlumeFuncTest.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/FlumeFuncTest.xml (original)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/FlumeFuncTest.xml Sat Jul 20 21:16:45 2013
@@ -19,7 +19,7 @@
<configuration packages="" status="error" name="Flume">
<MarkerFilter marker="EVENT" onMatch="ACCEPT" onMisMatch="NEUTRAL"/>
<Appenders>
- <Flume name="eventLogger" suppressExceptions="false" mdcPrefix="." compress="true">
+ <Flume name="eventLogger" ignoreExceptions="false" mdcPrefix="." compress="true">
<Agent host="192.168.10.101" port="8800"/>
<RFC5424Layout enterpriseNumber="18060" includeMDC="true" mdcId="RequestContext" appName="MyApp"/>
</Flume>
Modified: logging/log4j/log4j2/trunk/core/src/test/resources/log4j-advertiser.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/log4j-advertiser.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/log4j-advertiser.xml (original)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/log4j-advertiser.xml Sat Jul 20 21:16:45 2013
@@ -31,11 +31,11 @@
<pattern>%d %p %C{1.} [%t] %m%n</pattern>
</PatternLayout>
</File>
- <Socket name="Socket1" host="localhost" port="5560" protocol="TCP" suppressExceptions="false"
+ <Socket name="Socket1" host="localhost" port="5560" protocol="TCP" ignoreExceptions="false"
reconnectionDelay="250" advertise="true">
<PatternLayout pattern="%msg%n"/>
</Socket>
- <Socket name="Socket2" host="localhost" port="5565" protocol="UDP" suppressExceptions="false"
+ <Socket name="Socket2" host="localhost" port="5565" protocol="UDP" ignoreExceptions="false"
reconnectionDelay="250">
<PatternLayout pattern="%msg%n"/>
</Socket>
Modified: logging/log4j/log4j2/trunk/core/src/test/resources/log4j-failover.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/log4j-failover.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/log4j-failover.xml (original)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/log4j-failover.xml Sat Jul 20 21:16:45 2013
@@ -21,12 +21,12 @@
<AlwaysFail name="Fail" />
<FailOnce name="Once"/>
<List name="List" />
- <Failover name="Failover" primary="Fail" suppressExceptions="false">
+ <Failover name="Failover" primary="Fail" ignoreExceptions="false">
<Failovers>
<appender-ref ref="List"/>
</Failovers>
</Failover>
- <Failover name="FailoverOnce" primary="Once" suppressExceptions="false" retryInterval="1">
+ <Failover name="FailoverOnce" primary="Once" ignoreExceptions="false" retryInterval="1">
<Failovers>
<appender-ref ref="List"/>
</Failovers>
Modified: logging/log4j/log4j2/trunk/core/src/test/resources/log4j-jmsqueue-failover.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/log4j-jmsqueue-failover.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/log4j-jmsqueue-failover.xml (original)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/log4j-jmsqueue-failover.xml Sat Jul 20 21:16:45 2013
@@ -20,14 +20,14 @@
<Appenders>
<List name="List"/>
<JMSQueue name="Log4j2Queue" queueBindingName="Log4j2Queue" factoryBindingName="QueueConnectionFactory"
- suppressExceptions="false"/>
- <Rewrite name="Rewrite" suppressExceptions="false">
+ ignoreExceptions="false"/>
+ <Rewrite name="Rewrite" ignoreExceptions="false">
<PropertiesRewritePolicy>
<Property name="appender">List</Property>
</PropertiesRewritePolicy>
<appender-ref ref="Log4j2Queue"/>
</Rewrite>
- <Failover name="Failover" primary="Rewrite" suppressExceptions="false">
+ <Failover name="Failover" primary="Rewrite" ignoreExceptions="false">
<Failovers>
<appender-ref ref="List"/>
</Failovers>
Modified: logging/log4j/log4j2/trunk/core/src/test/resources/log4j-jmstopic-failover.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/log4j-jmstopic-failover.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/log4j-jmstopic-failover.xml (original)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/log4j-jmstopic-failover.xml Sat Jul 20 21:16:45 2013
@@ -20,14 +20,14 @@
<Appenders>
<List name="List"/>
<JMSTopic name="Log4j2Topic" topicBindingName="Log4j2Topic" factoryBindingName="TopicConnectionFactory"
- suppressExceptions="false"/>
- <Rewrite name="Rewrite" suppressExceptions="false">
+ ignoreExceptions="false"/>
+ <Rewrite name="Rewrite" ignoreExceptions="false">
<PropertiesRewritePolicy>
<Property name="appender">List</Property>
</PropertiesRewritePolicy>
<appender-ref ref="Log4j2Topic"/>
</Rewrite>
- <Failover name="Failover" primary="Rewrite" suppressExceptions="false">
+ <Failover name="Failover" primary="Rewrite" ignoreExceptions="false">
<Failovers>
<appender-ref ref="List"/>
</Failovers>
Modified: logging/log4j/log4j2/trunk/core/src/test/resources/log4j-socket.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/log4j-socket.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/log4j-socket.xml (original)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/log4j-socket.xml Sat Jul 20 21:16:45 2013
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" name="MyApp" packages="org.apache.logging.log4j.test">
<appenders>
- <Socket name="socket" host="localhost" port="5514" protocol="TCP" suppressExceptions="false"
+ <Socket name="socket" host="localhost" port="5514" protocol="TCP" ignoreExceptions="false"
reconnectionDelay="100">
<BasicLayout />
</Socket>
Modified: logging/log4j/log4j2/trunk/core/src/test/resources/log4j-socket2.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/resources/log4j-socket2.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/resources/log4j-socket2.xml (original)
+++ logging/log4j/log4j2/trunk/core/src/test/resources/log4j-socket2.xml Sat Jul 20 21:16:45 2013
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="debug" name="MyApp">
<appenders>
- <Socket name="socket" host="localhost" port="5514" protocol="TCP" suppressExceptions="false"
+ <Socket name="socket" host="localhost" port="5514" protocol="TCP" ignoreExceptions="false"
reconnectionDelay="0">
<PatternLayout pattern="%msg%n"/>
</Socket>
Modified: logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java (original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java Sat Jul 20 21:16:45 2013
@@ -67,11 +67,11 @@ public final class FlumeAppender<T exten
}
}
- private FlumeAppender(final String name, final Filter filter, final Layout<T> layout, final boolean handleException,
- final String includes, final String excludes, final String required, final String mdcPrefix,
- final String eventPrefix, final boolean compress,
- final FlumeEventFactory factory, final AbstractFlumeManager manager) {
- super(name, filter, layout, handleException);
+ private FlumeAppender(final String name, final Filter filter, final Layout<T> layout,
+ final boolean ignoreExceptions, final String includes, final String excludes,
+ final String required, final String mdcPrefix, final String eventPrefix,
+ final boolean compress, final FlumeEventFactory factory, final AbstractFlumeManager manager) {
+ super(name, filter, layout, ignoreExceptions);
this.manager = manager;
this.mdcIncludes = includes;
this.mdcExcludes = excludes;
@@ -141,7 +141,8 @@ public final class FlumeAppender<T exten
* @param agentRetries The number of times to retry an agent before failing to the next agent.
* @param maxDelay The maximum number of seconds to wait for a complete batch.
* @param name The name of the Appender.
- * @param suppress If true exceptions will be handled in the appender.
+ * @param ignore If {@code "true"} (default) exceptions encountered when appending events are logged; otherwise
+ * they are propagated to the caller.
* @param excludes A comma separated list of MDC elements to exclude.
* @param includes A comma separated list of MDC elements to include.
* @param required A comma separated list of MDC elements that are required.
@@ -167,7 +168,7 @@ public final class FlumeAppender<T exten
@PluginAttr("agentRetries") final String agentRetries,
@PluginAttr("maxDelay") final String maxDelay,
@PluginAttr("name") final String name,
- @PluginAttr("suppressExceptions") final String suppress,
+ @PluginAttr("ignoreExceptions") final String ignore,
@PluginAttr("mdcExcludes") final String excludes,
@PluginAttr("mdcIncludes") final String includes,
@PluginAttr("mdcRequired") final String required,
@@ -181,7 +182,7 @@ public final class FlumeAppender<T exten
final boolean embed = embedded != null ? Boolean.parseBoolean(embedded) :
(agents == null || agents.length == 0) && properties != null && properties.length > 0;
- final boolean handleExceptions = Booleans.parseBoolean(suppress, true);
+ final boolean ignoreExceptions = Booleans.parseBoolean(ignore, true);
final boolean compress = Booleans.parseBoolean(compressBody, true);
ManagerType managerType;
if (type != null) {
@@ -261,7 +262,7 @@ public final class FlumeAppender<T exten
return null;
}
- return new FlumeAppender<S>(name, filter, layout, handleExceptions, includes,
+ return new FlumeAppender<S>(name, filter, layout, ignoreExceptions, includes,
excludes, required, mdcPrefix, eventPrefix, compress, factory, manager);
}
}
Modified: logging/log4j/log4j2/trunk/flume-ng/src/test/resources/default_embedded.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/test/resources/default_embedded.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/test/resources/default_embedded.xml (original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/test/resources/default_embedded.xml Sat Jul 20 21:16:45 2013
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" name="MyApp" packages="">
<appenders>
- <Flume name="eventLogger" suppressExceptions="false" compress="true" type="embedded" dataDir="InMemory">
+ <Flume name="eventLogger" ignoreExceptions="false" compress="true" type="embedded" dataDir="InMemory">
<Agent host="localhost" port="${sys:primaryPort}"/>
<Agent host="localhost" port="${sys:alternatePort}"/>
<RFC5424Layout enterpriseNumber="18060" includeMDC="true" appName="MyApp"/>
Modified: logging/log4j/log4j2/trunk/flume-ng/src/test/resources/embedded.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/test/resources/embedded.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/test/resources/embedded.xml (original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/test/resources/embedded.xml Sat Jul 20 21:16:45 2013
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" name="MyApp" packages="">
<appenders>
- <Flume name="eventLogger" suppressExceptions="false" compress="true" type="embedded">
+ <Flume name="eventLogger" ignoreExceptions="false" compress="true" type="embedded">
<Property name="channels">primary</Property>
<Property name="channels.primary.type">memory</Property>
<Property name="sources.log4j-source.interceptors">environment_interceptor</Property>
Modified: logging/log4j/log4j2/trunk/flume-ng/src/test/resources/persistent.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/flume-ng/src/test/resources/persistent.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/flume-ng/src/test/resources/persistent.xml (original)
+++ logging/log4j/log4j2/trunk/flume-ng/src/test/resources/persistent.xml Sat Jul 20 21:16:45 2013
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="info" name="MyApp" packages="org.apache.logging.log4j.flume.test">
<appenders>
- <Flume name="eventLogger" suppressExceptions="false" compress="true" type="persistent" dataDir="target/persistent"
+ <Flume name="eventLogger" ignoreExceptions="false" compress="true" type="persistent" dataDir="target/persistent"
batchsize="100" maxDelay="500">
<Agent host="localhost" port="${sys:primaryPort}"/>
<Agent host="localhost" port="${sys:alternatePort}"/>
Modified: logging/log4j/log4j2/trunk/samples/flume-embedded/src/main/resources/log4j-embedded.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/flume-embedded/src/main/resources/log4j-embedded.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/flume-embedded/src/main/resources/log4j-embedded.xml (original)
+++ logging/log4j/log4j2/trunk/samples/flume-embedded/src/main/resources/log4j-embedded.xml Sat Jul 20 21:16:45 2013
@@ -20,7 +20,7 @@
<MarkerFilter marker="EVENT" onMatch="ACCEPT" onMismatch="NEUTRAL" />
<appenders>
- <Flume name="flume" suppressExceptions="false" mdcPrefix="ReqCtx_" compress="false" embedded="true" dataDir="/tmp">
+ <Flume name="flume" ignoreExceptions="false" mdcPrefix="ReqCtx_" compress="false" embedded="true" dataDir="/tmp">
<Agent host="localhost" port="8800" />
<RFC5424Layout enterpriseNumber="12293" includeMDC="true" mdcId="RequestContext" appName="GL" />
</Flume>
Modified: logging/log4j/log4j2/trunk/samples/flume-remote/src/main/resources/log4j-remote.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/samples/flume-remote/src/main/resources/log4j-remote.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/samples/flume-remote/src/main/resources/log4j-remote.xml (original)
+++ logging/log4j/log4j2/trunk/samples/flume-remote/src/main/resources/log4j-remote.xml Sat Jul 20 21:16:45 2013
@@ -20,7 +20,7 @@
<MarkerFilter marker="EVENT" onMatch="ACCEPT" onMismatch="NEUTRAL" />
<appenders>
- <Flume name="flume" suppressExceptions="false" mdcPrefix="ReqCtx_" compress="false">
+ <Flume name="flume" ignoreExceptions="false" mdcPrefix="ReqCtx_" compress="false">
<Agent host="localhost" port="8800" />
<RFC5424Layout enterpriseNumber="12293" includeMDC="true" mdcId="RequestContext" appName="GL" />
</Flume>
Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Sat Jul 20 21:16:45 2013
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -60,6 +60,18 @@
<action dev="nickwilliams" type="update">
Improved site by adding quick jump-off page and menu for Javadoc links for all components.
</action>
+ <action dev="nickwilliams" type="update">
+ Changed the "suppressExceptions" configuration attribute for all Appenders to "ignoreExceptions" to avoid
+ confusion with Java 7 suppressed exceptions. Also renamed the Appender#isExceptionSuppressed() method to
+ Appender#ignoreExceptions() to avoid the same confusion. All Appenders by default internally log and then ignore
+ exceptions encountered while logging. Setting "ignoreExceptions" to "false" on an Appender causes it to allow
+ exceptions to propagate to the caller. You must set "ignoreExceptions" to "false" for Appenders you are wrapping
+ in the Failover Appender.
+ </action>
+ <action dev="nickwilliams" type="update">
+ Changed the (relatively new) PatternLayout configuration attribute "suppressExceptions" to
+ "alwaysWriteExceptions" to more correctly indicate what it does. No behavior change.
+ </action>
</release>
<release version="2.0-beta8" date="2013-07-10" description="Bug fixes and enhancements">
<action issue="LOG4J2-270" dev="nickwilliams" type="update">
Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/appenders.xml Sat Jul 20 21:16:45 2013
@@ -93,10 +93,12 @@
<td>The name of the Appender.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<tr>
<td>includeLocation</td>
@@ -168,10 +170,12 @@
<td>The name of the Appender.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<tr>
<td>target</td>
@@ -236,10 +240,11 @@
<td>The number of seconds that should pass before retrying the primary Appender. The default is 60.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead.</td>
</tr>
<tr>
<td>target</td>
@@ -254,17 +259,17 @@
<pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" name="MyApp" packages="">
<appenders>
- <RollingFile name="RollingFile" fileName="logs/app.log"
- filePattern="logs/app-%d{MM-dd-yyyy}.log.gz">
+ <RollingFile name="RollingFile" fileName="logs/app.log" filePattern="logs/app-%d{MM-dd-yyyy}.log.gz"
+ ignoreExceptions="false">
<PatternLayout>
<pattern>%d %p %c{1.} [%t] %m%n</pattern>
</PatternLayout>
<TimeBasedTriggeringPolicy />
</RollingFile>
- <Console name="STDOUT" target="SYSTEM_OUT">
+ <Console name="STDOUT" target="SYSTEM_OUT" ignoreExceptions="false">
<PatternLayout pattern="%m%n"/>
</Console>
- <Failover name="Failover" primary="RollingFile" suppressExceptions="false">
+ <Failover name="Failover" primary="RollingFile">
<Failovers>
<appender-ref ref="Console"/>
</Failovers>
@@ -358,15 +363,14 @@
<td>String</td>
<td>The name of the Appender.</td>
</tr>
- <tr>
- <td>suppressExceptions</td>
- <td>boolean</td>
- <td>The default is true, causing exceptions to be internally
- logged and then ignored. When set to
- false exceptions will be
- percolated to the caller.
- </td>
- </tr>
+ <tr>
+ <td>ignoreExceptions</td>
+ <td>boolean</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
+ </tr>
<caption align="top">FastFileAppender Parameters</caption>
</table>
<p>
@@ -534,15 +538,14 @@
archive file.
</td>
</tr>
- <tr>
- <td>suppressExceptions</td>
- <td>boolean</td>
- <td>The default is true, causing exceptions to be internally
- logged and then ignored. When set to
- false exceptions will be
- percolated to the caller.
- </td>
- </tr>
+ <tr>
+ <td>ignoreExceptions</td>
+ <td>boolean</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
+ </tr>
<caption align="top">FastRollingFileAppender Parameters</caption>
</table>
<a name="FRFA_TriggeringPolicies" />
@@ -723,10 +726,12 @@
<td>The name of the Appender.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<caption align="top">FileAppender Parameters</caption>
</table>
@@ -892,12 +897,13 @@
<td>integer</td>
<td>The number of milliseconds Flume will wait before timing out the request.</td>
</tr>
-
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<tr>
<td>type</td>
@@ -913,7 +919,7 @@
<pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" name="MyApp" packages="">
<appenders>
- <Flume name="eventLogger" suppressExceptions="false" compress="true">
+ <Flume name="eventLogger" compress="true">
<Agent host="192.168.10.101" port="8800"/>
<Agent host="192.168.10.102" port="8800"/>
<RFC5424Layout enterpriseNumber="18060" includeMDC="true" appName="MyApp"/>
@@ -933,7 +939,7 @@
<pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" name="MyApp" packages="">
<appenders>
- <Flume name="eventLogger" suppressExceptions="false" compress="true" type="persistent" dataDir="./logData">
+ <Flume name="eventLogger" compress="true" type="persistent" dataDir="./logData">
<Agent host="192.168.10.101" port="8800"/>
<Agent host="192.168.10.102" port="8800"/>
<RFC5424Layout enterpriseNumber="18060" includeMDC="true" appName="MyApp"/>
@@ -955,7 +961,7 @@
<pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" name="MyApp" packages="">
<appenders>
- <Flume name="eventLogger" suppressExceptions="false" compress="true" type="Embedded">
+ <Flume name="eventLogger" compress="true" type="Embedded">
<Agent host="192.168.10.101" port="8800"/>
<Agent host="192.168.10.102" port="8800"/>
<RFC5424Layout enterpriseNumber="18060" includeMDC="true" appName="MyApp"/>
@@ -981,7 +987,7 @@
<pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<configuration status="error" name="MyApp" packages="">
<appenders>
- <Flume name="eventLogger" suppressExceptions="false" compress="true" type="Embedded">
+ <Flume name="eventLogger" compress="true" type="Embedded">
<Property name="channels">file</Property>
<Property name="channels.file.type">file</Property>
<Property name="channels.file.checkpointDir">target/file-channel/checkpoint</Property>
@@ -1034,10 +1040,12 @@
<td><em>Required.</em> The name of the Appender.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to false
- exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<tr>
<td>filter</td>
@@ -1325,10 +1333,12 @@
<a href="http://download.oracle.com/javase/6/docs/api/javax/naming/Context.html#SECURITY_CREDENTIALS">SECURITY_CREDENTIALS</a>.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<tr>
<td>urlPkgPrefixes</td>
@@ -1434,10 +1444,12 @@
<a href="http://download.oracle.com/javase/6/docs/api/javax/naming/Context.html#SECURITY_CREDENTIALS">SECURITY_CREDENTIALS</a>.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<tr>
<td>urlPkgPrefixes</td>
@@ -1491,10 +1503,12 @@
<td><em>Required.</em> The name of the Appender.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to false
- exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<tr>
<td>filter</td>
@@ -1619,10 +1633,12 @@ public class JpaLogEntity extends Abstra
<td><em>Required.</em> The name of the Appender.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to false
- exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<tr>
<td>filter</td>
@@ -1925,10 +1941,12 @@ public class JpaLogEntity extends Abstra
<td>The RewritePolicy that will manipulate the LogEvent.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<caption align="top">RewriteAppender Parameters</caption>
</table>
@@ -2125,10 +2143,12 @@ public class JpaLogEntity extends Abstra
<td>The strategy to use to determine the name and location of the archive file.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<caption align="top">RollingFileAppender Parameters</caption>
</table>
@@ -2430,10 +2450,12 @@ public class JpaLogEntity extends Abstra
<td>Contains one or more Route declarations to identify the criteria for choosing Appenders.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<caption align="top">RoutingAppender Parameters</caption>
</table>
@@ -2460,7 +2482,7 @@ public class JpaLogEntity extends Abstra
<pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" name="MyApp" packages="">
<appenders>
- <Flume name="AuditLogger" suppressExceptions="false" compress="true">
+ <Flume name="AuditLogger" compress="true">
<Agent host="192.168.10.101" port="8800"/>
<Agent host="192.168.10.102" port="8800"/>
<RFC5424Layout enterpriseNumber="18060" includeMDC="true" appName="MyApp"/>
@@ -2586,11 +2608,12 @@ public class JpaLogEntity extends Abstra
<td>The username required to authenticate against the SMTP server.</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.
- </td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<tr>
<td>to</td>
@@ -2602,8 +2625,8 @@ public class JpaLogEntity extends Abstra
<pre class="prettyprint linenums"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn" name="MyApp" packages="">
<appenders>
- <SMTP name="Mail" suppressExceptions="false" subject="Error Log" to="errors@logging.apache.org"
- from="test@logging.apache.org" smtpHost="localhost" smtpPort="25" bufferSize="50">
+ <SMTP name="Mail" subject="Error Log" to="errors@logging.apache.org" from="test@logging.apache.org"
+ smtpHost="localhost" smtpPort="25" bufferSize="50">
</SMTP>
</appenders>
<loggers>
@@ -2676,14 +2699,16 @@ public class JpaLogEntity extends Abstra
<td>integer</td>
<td>If set to a value greater than 0, after an error the SocketManager will attempt to reconnect to
the server after waiting the specified number of milliseconds. If the reconnect fails then
- an exception will be thrown (which can be caught by the application if suppressExceptions is
- set to false).</td>
+ an exception will be thrown (which can be caught by the application if <code>ignoreExceptions</code> is
+ set to <code>false</code>).</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<caption align="top">SocketAppender Parameters</caption>
</table>
@@ -2842,14 +2867,16 @@ public class JpaLogEntity extends Abstra
<td>integer</td>
<td>If set to a value greater than 0, after an error the SocketManager will attempt to reconnect to
the server after waiting the specified number of milliseconds. If the reconnect fails then
- an exception will be thrown (which can be caught by the application if suppressExceptions is
- set to false).</td>
+ an exception will be thrown (which can be caught by the application if <code>ignoreExceptions</code> is
+ set to <code>false</code>).</td>
</tr>
<tr>
- <td>suppressExceptions</td>
+ <td>ignoreExceptions</td>
<td>boolean</td>
- <td>The default is true, causing exceptions to be internally logged and then ignored. When set to
- false exceptions will be percolated to the caller.</td>
+ <td>The default is <code>true</code>, causing exceptions encountered while appending events to be
+ internally logged and then ignored. When set to <code>false</code> exceptions will be propagated to the
+ caller, instead. You must set this to <code>false</code> when wrapping this Appender in a
+ <a href="#FailoverAppender">FailoverAppender</a>.</td>
</tr>
<tr>
<td>loggerFields</td>
Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm Sat Jul 20 21:16:45 2013
@@ -947,7 +947,7 @@ public class Bar {
2011-11-23 17:08:00,802 DEBUG Generated plugins in 0.001349000 seconds
2011-11-23 17:08:00,804 DEBUG Calling createAppender on class org.apache.logging.log4j.core.
appender.ConsoleAppender for element Console with params(PatternLayout(%m%n), null,
- target="null", name="STDOUT", suppressExceptions="null")
+ target="null", name="STDOUT", ignoreExceptions="null")
2011-11-23 17:08:00,804 DEBUG Calling createFilter on class org.apache.logging.log4j.core.
filter.ThresholdFilter for element ThresholdFilter with params(level="debug",
onMatch="null", onMismatch="null")
@@ -966,7 +966,7 @@ public class Bar {
Route(type=static Reference=List key='Service')})
2011-11-23 17:08:00,827 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.
routing.RoutingAppender for element Routing with params(name="Routing",
- suppressExceptions="null", Routes({Route(type=dynamic default),Route(type=static
+ ignoreExceptions="null", Routes({Route(type=dynamic default),Route(type=static
Reference=STDOUT key='Audit'),
Route(type=static Reference=List key='Service')}), Configuration(RoutingTest), null, null)
2011-11-23 17:08:00,827 DEBUG Calling createAppenders on class org.apache.logging.log4j.core.config.
@@ -997,7 +997,7 @@ public class Bar {
filePattern="target/rolling1/test1-Unknown.%i.log.gz", append="null", name="Rolling-Unknown",
bufferedIO="null", immediateFlush="null",
SizeBasedTriggeringPolicy(SizeBasedTriggeringPolicy(size=500)), null,
- PatternLayout(%d %p %c{1.} [%t] %m%n), null, suppressExceptions="null")
+ PatternLayout(%d %p %c{1.} [%t] %m%n), null, ignoreExceptions="null")
2011-11-23 17:08:00,858 DEBUG Generated plugins in 0.002014000 seconds
2011-11-23 17:08:00,889 DEBUG Reconfiguration started for context sun.misc.
Launcher$AppClassLoader@37b90b39
@@ -1015,14 +1015,14 @@ public class Bar {
2011-11-23 17:08:00,797 DEBUG Calling createFilter on class org.apache.logging.log4j.core.filter.ThresholdFilter for element ThresholdFilter with params(level="debug", onMatch="null", onMismatch="null")
2011-11-23 17:08:00,800 DEBUG Calling createLayout on class org.apache.logging.log4j.core.layout.PatternLayout for element PatternLayout with params(pattern="%m%n", Configuration(RoutingTest), null, charset="null")
2011-11-23 17:08:00,802 DEBUG Generated plugins in 0.001349000 seconds
-2011-11-23 17:08:00,804 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.ConsoleAppender for element Console with params(PatternLayout(%m%n), null, target="null", name="STDOUT", suppressExceptions="null")
+2011-11-23 17:08:00,804 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.ConsoleAppender for element Console with params(PatternLayout(%m%n), null, target="null", name="STDOUT", ignoreExceptions="null")
2011-11-23 17:08:00,804 DEBUG Calling createFilter on class org.apache.logging.log4j.core.filter.ThresholdFilter for element ThresholdFilter with params(level="debug", onMatch="null", onMismatch="null")
2011-11-23 17:08:00,806 DEBUG Calling createAppender on class org.apache.logging.log4j.test.appender.ListAppender for element List with params(name="List", entryPerNewLine="null", raw="null", null, ThresholdFilter(DEBUG))
2011-11-23 17:08:00,813 DEBUG Calling createRoute on class org.apache.logging.log4j.core.appender.routing.Route for element Route with params(appender-ref="null", key="null", Node=Route)
2011-11-23 17:08:00,823 DEBUG Calling createRoute on class org.apache.logging.log4j.core.appender.routing.Route for element Route with params(appender-ref="STDOUT", key="Audit", Node=Route)
2011-11-23 17:08:00,824 DEBUG Calling createRoute on class org.apache.logging.log4j.core.appender.routing.Route for element Route with params(appender-ref="List", key="Service", Node=Route)
2011-11-23 17:08:00,825 DEBUG Calling createRoutes on class org.apache.logging.log4j.core.appender.routing.Routes for element Routes with params(pattern="${dollar}{sd:type}", routes={Route(type=dynamic default), Route(type=static Reference=STDOUT key='Audit'), Route(type=static Reference=List key='Service')})
-2011-11-23 17:08:00,827 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.routing.RoutingAppender for element Routing with params(name="Routing", suppressExceptions="null", Routes({Route(type=dynamic default),Route(type=static Reference=STDOUT key='Audit'),Route(type=static Reference=List key='Service')}), Configuration(RoutingTest), null, null)
+2011-11-23 17:08:00,827 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.routing.RoutingAppender for element Routing with params(name="Routing", ignoreExceptions="null", Routes({Route(type=dynamic default),Route(type=static Reference=STDOUT key='Audit'),Route(type=static Reference=List key='Service')}), Configuration(RoutingTest), null, null)
2011-11-23 17:08:00,827 DEBUG Calling createAppenders on class org.apache.logging.log4j.core.config.plugins.AppendersPlugin for element appenders with params(appenders={STDOUT, List, Routing})
2011-11-23 17:08:00,828 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.plugins.AppenderRefPlugin for element appender-ref with params(ref="Routing")
2011-11-23 17:08:00,829 DEBUG Calling createLogger on class org.apache.logging.log4j.core.config.LoggerConfig for element logger with params(additivity="false", level="info", name="EventLogger", appender-ref={Routing}, null)
@@ -1032,7 +1032,7 @@ public class Bar {
2011-11-23 17:08:00,834 DEBUG Reconfiguration completed
2011-11-23 17:08:00,846 DEBUG Calling createLayout on class org.apache.logging.log4j.core.layout.PatternLayout for element PatternLayout with params(pattern="%d %p %c{1.} [%t] %m%n", Configuration(RoutingTest), null, charset="null")
2011-11-23 17:08:00,849 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy for element SizeBasedTriggeringPolicy with params(size="500")
-2011-11-23 17:08:00,851 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile with params(fileName="target/rolling1/rollingtest-Unknown.log", filePattern="target/rolling1/test1-Unknown.%i.log.gz", append="null", name="Rolling-Unknown", bufferedIO="null", immediateFlush="null", SizeBasedTriggeringPolicy(SizeBasedTriggeringPolicy(size=500)), null, PatternLayout(%d %p %c{1.} [%t] %m%n), null, suppressExceptions="null")
+2011-11-23 17:08:00,851 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile with params(fileName="target/rolling1/rollingtest-Unknown.log", filePattern="target/rolling1/test1-Unknown.%i.log.gz", append="null", name="Rolling-Unknown", bufferedIO="null", immediateFlush="null", SizeBasedTriggeringPolicy(SizeBasedTriggeringPolicy(size=500)), null, PatternLayout(%d %p %c{1.} [%t] %m%n), null, ignoreExceptions="null")
2011-11-23 17:08:00,858 DEBUG Generated plugins in 0.002014000 seconds
2011-11-23 17:08:00,889 DEBUG Reconfiguration started for context sun.misc.Launcher$AppClassLoader@37b90b39
2011-11-23 17:08:00,890 DEBUG Generated plugins in 0.001355000 seconds
Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/extending.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/extending.xml?rev=1505209&r1=1505208&r2=1505209&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/extending.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/extending.xml Sat Jul 20 21:16:45 2013
@@ -296,16 +296,16 @@ public final class ThresholdFilter exten
public final class StubAppender extends OutputStreamAppender {
private StubAppender(String name, Layout layout, Filter filter, StubManager manager,
- boolean handleExceptions) {
+ boolean ignoreExceptions) {
}
@PluginFactory
public static StubAppender createAppender(@PluginAttr("name") String name,
- @PluginAttr("suppressExceptions") String suppress,
+ @PluginAttr("ignoreExceptions") String ignore,
@PluginElement("layout") Layout layout,
@PluginElement("filters") Filter filter) {
- boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
+ boolean ignoreExceptions = Boolean.parseBoolean(ignore);
if (name == null) {
LOGGER.error("No name provided for StubAppender");
@@ -319,7 +319,7 @@ public final class StubAppender extends
if (layout == null) {
layout = PatternLayout.createLayout(null, null, null, null);
}
- return new StubAppender(name, layout, filter, manager, handleExceptions);
+ return new StubAppender(name, layout, filter, manager, ignoreExceptions);
}
}</pre>
</subsection>