Repository: logging-log4j2 Updated Branches: refs/heads/master 8fde30c71 -> 4f3023463
Specify scale (millis in this case) in attribute name and add alias for backward compatibility. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4f302346 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4f302346 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4f302346 Branch: refs/heads/master Commit: 4f3023463a683d9ca723c9c1df44aade3749ca32 Parents: 8fde30c Author: Gary Gregory <[email protected]> Authored: Fri Oct 3 19:10:12 2014 -0400 Committer: Gary Gregory <[email protected]> Committed: Fri Oct 3 19:10:12 2014 -0400 ---------------------------------------------------------------------- .../apache/logging/log4j/core/appender/SyslogAppender.java | 8 +++++--- src/site/xdoc/manual/appenders.xml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4f302346/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java index 3b86d58..38201ab 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/SyslogAppender.java @@ -23,6 +23,7 @@ import org.apache.logging.log4j.core.Filter; import org.apache.logging.log4j.core.Layout; import org.apache.logging.log4j.core.config.Configuration; import org.apache.logging.log4j.core.config.plugins.Plugin; +import org.apache.logging.log4j.core.config.plugins.PluginAliases; import org.apache.logging.log4j.core.config.plugins.PluginAttribute; import org.apache.logging.log4j.core.config.plugins.PluginConfiguration; import org.apache.logging.log4j.core.config.plugins.PluginElement; @@ -59,7 +60,7 @@ public class SyslogAppender extends SocketAppender { * @param port The port to connect to on the target host. * @param protocolStr The Protocol to use. * @param sslConfig TODO - * @param reconnectionDelay The interval in which failed writes should be retried. + * @param reconnectionDelayMillis The interval in which failed writes should be retried. * @param immediateFail True if the write should fail if no socket is immediately available. * @param name The name of the Appender. * @param immediateFlush "true" if data should be flushed on each write. @@ -97,7 +98,8 @@ public class SyslogAppender extends SocketAppender { @PluginAttribute(value = "port", defaultInt = 0) final int port, @PluginAttribute("protocol") final String protocolStr, @PluginElement("SSL") final SslConfiguration sslConfig, - @PluginAttribute(value = "reconnectionDelay", defaultInt = 0) final int reconnectionDelay, + @PluginAliases("reconnectionDelay") // deprecated + @PluginAttribute(value = "reconnectionDelayMillis", defaultInt = 0) final int reconnectionDelayMillis, @PluginAttribute(value = "immediateFail", defaultBoolean = true) final boolean immediateFail, @PluginAttribute("name") final String name, @PluginAttribute(value = "immediateFlush", defaultBoolean = true) final boolean immediateFlush, @@ -139,7 +141,7 @@ public class SyslogAppender extends SocketAppender { return null; } final AbstractSocketManager manager = createSocketManager(name, protocol, host, port, sslConfig, - reconnectionDelay, immediateFail, layout); + reconnectionDelayMillis, immediateFail, layout); return new SyslogAppender(name, layout, filter, ignoreExceptions, immediateFlush, manager, advertise ? config.getAdvertiser() : null); http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4f302346/src/site/xdoc/manual/appenders.xml ---------------------------------------------------------------------- diff --git a/src/site/xdoc/manual/appenders.xml b/src/site/xdoc/manual/appenders.xml index f49a89f..193ad57 100644 --- a/src/site/xdoc/manual/appenders.xml +++ b/src/site/xdoc/manual/appenders.xml @@ -3087,7 +3087,7 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity { <td>Contains the configuration for the KeyStore and TrustStore.</td> </tr> <tr> - <td>reconnectionDelay</td> + <td>reconnectionDelayMillis</td> <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
