svn commit: r1765389 - in /logging/log4net/trunk/src/Appender: AppenderSkeleton.cs BufferingAppenderSkeleton.cs DebugAppender.cs TextWriterAppender.cs TraceAppender.cs

2016-10-17 Thread bodewig
Author: bodewig
Date: Tue Oct 18 04:37:36 2016
New Revision: 1765389

URL: http://svn.apache.org/viewvc?rev=1765389=rev
Log:
LOG4NET-511 move Flush to AppenderSkeleton

Modified:
logging/log4net/trunk/src/Appender/AppenderSkeleton.cs
logging/log4net/trunk/src/Appender/BufferingAppenderSkeleton.cs
logging/log4net/trunk/src/Appender/DebugAppender.cs
logging/log4net/trunk/src/Appender/TextWriterAppender.cs
logging/log4net/trunk/src/Appender/TraceAppender.cs

Modified: logging/log4net/trunk/src/Appender/AppenderSkeleton.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/AppenderSkeleton.cs?rev=1765389=1765388=1765389=diff
==
--- logging/log4net/trunk/src/Appender/AppenderSkeleton.cs (original)
+++ logging/log4net/trunk/src/Appender/AppenderSkeleton.cs Tue Oct 18 04:37:36 
2016
@@ -44,7 +44,7 @@ namespace log4net.Appender
/// 
/// Nicko Cadell
/// Gert Driesen
-   public abstract class AppenderSkeleton : IAppender, IBulkAppender, 
IOptionHandler
+   public abstract class AppenderSkeleton : IAppender, IBulkAppender, 
IOptionHandler, IFlushable
{
#region Protected Instance Constructors
 
@@ -782,6 +782,18 @@ namespace log4net.Appender
 
#endregion
 
+   /// 
+   /// Flushes any buffered log data.
+   /// 
+   /// 
+   /// This implementation doesn't flush anything and always 
returns false
+   /// 
+   /// True if all logging events were flushed 
successfully, else false.
+   public virtual bool Flush(int millisecondsTimeout)
+   {
+   return false;
+   }
+
#region Private Instance Fields
 
/// 

Modified: logging/log4net/trunk/src/Appender/BufferingAppenderSkeleton.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/BufferingAppenderSkeleton.cs?rev=1765389=1765388=1765389=diff
==
--- logging/log4net/trunk/src/Appender/BufferingAppenderSkeleton.cs (original)
+++ logging/log4net/trunk/src/Appender/BufferingAppenderSkeleton.cs Tue Oct 18 
04:37:36 2016
@@ -68,7 +68,7 @@ namespace log4net.Appender
/// 
/// Nicko Cadell
/// Gert Driesen
-public abstract class BufferingAppenderSkeleton : AppenderSkeleton, 
IFlushable
+public abstract class BufferingAppenderSkeleton : AppenderSkeleton
{
#region Protected Instance Constructors
 
@@ -266,7 +266,7 @@ namespace log4net.Appender
 /// 
 /// The maximum time to wait for 
logging events to be flushed.
 /// True if all logging events were flushed 
successfully, else false.
-public virtual bool Flush(int millisecondsTimeout)
+public override bool Flush(int millisecondsTimeout)
 {
 Flush();
 return true;

Modified: logging/log4net/trunk/src/Appender/DebugAppender.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/DebugAppender.cs?rev=1765389=1765388=1765389=diff
==
--- logging/log4net/trunk/src/Appender/DebugAppender.cs (original)
+++ logging/log4net/trunk/src/Appender/DebugAppender.cs Tue Oct 18 04:37:36 2016
@@ -40,10 +40,7 @@ namespace log4net.Appender
/// 
/// 
/// Nicko Cadell
-public class DebugAppender : AppenderSkeleton
-#if !NETSTANDARD1_3
-   , IFlushable
-#endif
+   public class DebugAppender : AppenderSkeleton
{
#region Public Instance Constructors
 
@@ -111,7 +108,7 @@ namespace log4net.Appender
 /// 
 /// The maximum time to wait for 
logging events to be flushed.
 /// True if all logging events were flushed 
successfully, else false.
-public bool Flush(int millisecondsTimeout)
+public override bool Flush(int millisecondsTimeout)
 {
 // Nothing to do if ImmediateFlush is true
 if (m_immediateFlush) return true;

Modified: logging/log4net/trunk/src/Appender/TextWriterAppender.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/TextWriterAppender.cs?rev=1765389=1765388=1765389=diff
==
--- logging/log4net/trunk/src/Appender/TextWriterAppender.cs (original)
+++ logging/log4net/trunk/src/Appender/TextWriterAppender.cs Tue Oct 18 
04:37:36 2016
@@ -42,7 +42,7 @@ namespace log4net.Appender
/// Nicko Cadell
/// Gert Driesen
/// Douglas de la Torre
-public class TextWriterAppender : AppenderSkeleton, IFlushable
+public class TextWriterAppender : AppenderSkeleton
{
#region 

[4/9] logging-log4j2 git commit: LOG4J2-1623 Update documentation

2016-10-17 Thread mikes
LOG4J2-1623  Update documentation


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/5564556c
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/5564556c
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/5564556c

Branch: refs/heads/master
Commit: 5564556cd81be70926d6f35a2ff323f623728f5a
Parents: 9446525
Author: Mikael Ståldal 
Authored: Wed Oct 5 13:35:41 2016 +0200
Committer: Mikael Ståldal 
Committed: Wed Oct 5 13:35:41 2016 +0200

--
 .../org/apache/logging/log4j/core/LoggerContext.java| 12 
 src/site/xdoc/manual/configuration.xml.vm   |  9 +++--
 2 files changed, 19 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/5564556c/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
--
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
index c964965..2681485 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
@@ -302,6 +302,18 @@ public class LoggerContext extends AbstractLifeCycle
 stop();
 }
 
+/**
+ * How many milliseconds appenders and other plugins will get to shutdown.
+ *
+ * Not all plugins will honor this, it is a hint and not an absolute 
guarantee that the this method not block longer.
+ * Setting timeout too low increase the risk of losing outstanding log 
events not yet written to the final
+ * destination.
+ *
+ * @param timeout the maximum time to wait, or 0 which mean that each 
plugin uses its default timeout
+ * @param timeUnit the time unit of the timeout argument
+ * @return true if the context was stopped cleanly and normally, false 
otherwise.
+ * @since 2.7
+ */
 @Override
 public boolean stop(final long timeout, final TimeUnit timeUnit) {
 LOGGER.debug("Stopping LoggerContext[name={}, {}]...", getName(), 
this);

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/5564556c/src/site/xdoc/manual/configuration.xml.vm
--
diff --git a/src/site/xdoc/manual/configuration.xml.vm 
b/src/site/xdoc/manual/configuration.xml.vm
index acd41fd..2b59e8d 100644
--- a/src/site/xdoc/manual/configuration.xml.vm
+++ b/src/site/xdoc/manual/configuration.xml.vm
@@ -409,8 +409,13 @@ public class Bar {
   
   
  shutdownTimeout
- Specifies how many milliseconds appenders and other 
plugins will get to shutdown when the JVM shuts down.
- Default is zero. (Not used if shutdownHook is set to 
"disable".)
+ Specifies how many milliseconds appenders and other 
plugins will get to shutdown when the JVM shuts
+ down. Default is zero which mean that each plugin uses its 
default timeout. Not all plugins will honor
+ this, it is a hint and not an absolute guarantee that the 
shutdown procedure will not take longer.
+ Setting this too low increase the risk of losing outstanding 
log events not yet written to the final
+ destination. See LoggerContext.stop(long, 
java.util.concurrent.TimeUnit).
+  (Not used if shutdownHook is set to "disable".)
   
 status
 The level of internal Log4j events that should be logged 
to the console.



[6/9] logging-log4j2 git commit: Merge branch 'master' into LOG4J2-1623

2016-10-17 Thread mikes
Merge branch 'master' into LOG4J2-1623


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/3064471e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/3064471e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/3064471e

Branch: refs/heads/master
Commit: 3064471eaa1b7f7d3c5e38349281e1ccdd054cfa
Parents: c92c327 2da9dfa
Author: Mikael Ståldal 
Authored: Thu Oct 6 13:29:28 2016 +0200
Committer: Mikael Ståldal 
Committed: Thu Oct 6 13:29:28 2016 +0200

--
 log4j-bom/pom.xml| 4 
 .../main/java/org/apache/logging/log4j/core/LoggerContext.java   | 2 +-
 .../java/org/apache/logging/log4j/core/util/CyclicBuffer.java| 4 ++--
 .../org/apache/logging/log4j/core/util/ExecutorServices.java | 4 ++--
 src/site/site.xml| 1 +
 src/site/xdoc/javadoc.xml| 4 
 6 files changed, 10 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3064471e/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
--



[1/9] logging-log4j2 git commit: LOG4J2-1623 Configurable JVM shutdown hook timeout

2016-10-17 Thread mikes
Repository: logging-log4j2
Updated Branches:
  refs/heads/master 197997ac3 -> 19418b37d


LOG4J2-1623  Configurable JVM shutdown hook timeout


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/705e2725
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/705e2725
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/705e2725

Branch: refs/heads/master
Commit: 705e27253ca14cdf0e50039cada041065e308aee
Parents: 3176c96
Author: Mikael Ståldal 
Authored: Mon Oct 3 18:54:27 2016 +0200
Committer: Mikael Ståldal 
Committed: Mon Oct 3 18:54:27 2016 +0200

--
 .../logging/log4j/core/LoggerContext.java   |  9 ++--
 .../core/config/AbstractConfiguration.java  | 10 +
 .../log4j/core/config/Configuration.java|  2 +
 .../builder/api/ConfigurationBuilder.java   |  7 
 .../config/builder/impl/BuiltConfiguration.java |  4 ++
 .../impl/DefaultConfigurationBuilder.java   | 14 +++
 .../composite/CompositeConfiguration.java   |  2 +
 .../core/config/json/JsonConfiguration.java |  9 ++--
 .../PropertiesConfigurationBuilder.java |  3 ++
 .../log4j/core/config/xml/XmlConfiguration.java |  3 +-
 .../core/ShutdownTimeoutConfigurationTest.java  | 44 
 .../builder/ConfigurationBuilderTest.java   |  5 ++-
 .../resources/log4j-test-shutdownTimeout.xml| 38 +
 src/changes/changes.xml |  5 +++
 src/site/xdoc/manual/configuration.xml.vm   |  8 +++-
 15 files changed, 151 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/705e2725/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
--
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
index 7e13963..c964965 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
@@ -16,8 +16,6 @@
  */
 package org.apache.logging.log4j.core;
 
-import static 
org.apache.logging.log4j.core.util.ShutdownCallbackRegistry.SHUTDOWN_HOOK_MARKER;
-
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.io.File;
@@ -38,7 +36,7 @@ import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.core.config.Configuration;
 import org.apache.logging.log4j.core.config.ConfigurationFactory;
 import org.apache.logging.log4j.core.config.ConfigurationListener;
-import org.apache.logging.log4j.core.config.ConfigurationSource; // SUPPRESS 
CHECKSTYLE
+import org.apache.logging.log4j.core.config.ConfigurationSource;
 import org.apache.logging.log4j.core.config.DefaultConfiguration;
 import org.apache.logging.log4j.core.config.NullConfiguration;
 import org.apache.logging.log4j.core.config.Reconfigurable;
@@ -56,6 +54,8 @@ import org.apache.logging.log4j.spi.LoggerRegistry;
 import org.apache.logging.log4j.spi.Terminable;
 import org.apache.logging.log4j.util.PropertiesUtil;
 
+import static 
org.apache.logging.log4j.core.util.ShutdownCallbackRegistry.SHUTDOWN_HOOK_MARKER;
+
 /**
  * The LoggerContext is the anchor for the logging system. It maintains a list 
of all the loggers requested by
  * applications and a reference to the Configuration. The Configuration will 
contain the configured loggers, appenders,
@@ -265,6 +265,7 @@ public class LoggerContext extends AbstractLifeCycle
 if (factory instanceof ShutdownCallbackRegistry) {
 LOGGER.debug(SHUTDOWN_HOOK_MARKER, "Shutdown hook enabled. 
Registering a new one.");
 try {
+final long shutdownTimeoutMillis = 
this.configuration.getShutdownTimeoutMillis();
 this.shutdownCallback = ((ShutdownCallbackRegistry) 
factory).addShutdownCallback(new Runnable() {
 @Override
 public void run() {
@@ -272,7 +273,7 @@ public class LoggerContext extends AbstractLifeCycle
 final LoggerContext context = LoggerContext.this;
 LOGGER.debug(SHUTDOWN_HOOK_MARKER, "Stopping 
LoggerContext[name={}, {}]",
 context.getName(), context);
-context.stop();
+context.stop(shutdownTimeoutMillis, 
TimeUnit.MILLISECONDS);
 }
 
 @Override


[5/9] logging-log4j2 git commit: LOG4J2-1623 Update documentation

2016-10-17 Thread mikes
LOG4J2-1623  Update documentation


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/c92c327c
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/c92c327c
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/c92c327c

Branch: refs/heads/master
Commit: c92c327c3db50ff18d01234c0a427d3ad9869588
Parents: 5564556
Author: Mikael Ståldal 
Authored: Wed Oct 5 15:07:55 2016 +0200
Committer: Mikael Ståldal 
Committed: Wed Oct 5 15:07:55 2016 +0200

--
 .../logging/log4j/core/LoggerContext.java   | 21 +---
 .../logging/log4j/core/config/Configurator.java | 13 +++-
 src/site/xdoc/manual/configuration.xml.vm   | 10 +-
 3 files changed, 27 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c92c327c/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
--
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
index 2681485..4c759c0 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
@@ -303,15 +303,22 @@ public class LoggerContext extends AbstractLifeCycle
 }
 
 /**
- * How many milliseconds appenders and other plugins will get to shutdown.
- *
- * Not all plugins will honor this, it is a hint and not an absolute 
guarantee that the this method not block longer.
+ * Blocks until all Log4j tasks have completed execution after a shutdown 
request and all appenders have shut down,
+ * or the timeout occurs, or the current thread is interrupted, whichever 
happens first.
+ * 
+ * Not all appenders will honor this, it is a hint and not an absolute 
guarantee that the this method not block longer.
  * Setting timeout too low increase the risk of losing outstanding log 
events not yet written to the final
  * destination.
- *
- * @param timeout the maximum time to wait, or 0 which mean that each 
plugin uses its default timeout
- * @param timeUnit the time unit of the timeout argument
- * @return true if the context was stopped cleanly and normally, false 
otherwise.
+ * 
+ * Log4j can start threads to perform certain actions like file rollovers, 
calling this method with a positive timeout will
+ * block until the rollover thread is done.
+ *
+ * @param timeout the maximum time to wait, or 0 which mean that each 
apppender uses its default timeout, and don't wait for background
+tasks
+ * @param timeUnit
+ *the time unit of the timeout argument
+ * @return {@code true} if the logger context terminated and {@code false} 
if the timeout elapsed before
+ * termination.
  * @since 2.7
  */
 @Override

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/c92c327c/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
--
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
index 3da469d..28dd85f 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
@@ -346,13 +346,12 @@ public final class Configurator {
 }
 
 /**
- * Blocks until all Log4j tasks have completed execution after a shutdown 
request, or the timeout occurs, or the
- * current thread is interrupted, whichever happens first.
+ * Shuts down the given logger context.
  * 
- * Log4j can start threads to perform certain actions like file rollovers, 
calling this method with a timeout will
- * block until the rollover thread is done.
+ * Log4j can start threads to perform certain actions like file rollovers; 
calling this method with a positive
+ * timeout will block until the rollover thread is done.
  * 
- * 
+ *
  * @param ctx
  *the logger context to shut down, may be null.
  * @param timeout
@@ -361,6 +360,10 @@ public final class Configurator {
  *the time unit of the timeout argument
  * @return {@code true} if the logger context terminated and {@code false} 
if the timeout elapsed before
  * termination.
+ *
+ * @see LoggerContext#stop(long, TimeUnit)
+ *
+ * @since 2.7
  */
 

[8/9] logging-log4j2 git commit: Merge branch 'master' into LOG4J2-1623

2016-10-17 Thread mikes
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/19418b37/src/changes/changes.xml
--
diff --cc src/changes/changes.xml
index 6bd144c,d935048..2922511
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@@ -1,3090 -1,3096 +1,3099 @@@
 -
 -
 -
 -http://maven.apache.org/changes/1.0.0;
 -  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
 -  xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 
http://maven.apache.org/xsd/changes-1.0.0.xsd;>
 -  
 -Changes
 -  
 -  
 -
 -  
 -Console Appender does not pick up Oracle Java 8's sun.stdout.encoding 
and sun.stderr.encoding.
 -  
 -  
 -Fix MemoryMappedFileAppender.createAppender() Javadoc for 
immediateFlush.
 -  
 -  
 -Update JeroMQ from 0.3.5 to 0.3.6.
 -  
 -
 -
 -  
 -Fixed ClassCastException when using JUL logging during shutdown.
 -  
 -  
 -2.7-rc1: RollingFileAppender immediateFlush default value should be 
true, not false.
 -  
 -  
 -Improved performance of context data injector for web applications to 
be on par with standalone applications.
 -  
 -  
 -Introduced new interface LifeCycle2 with stop(long,TimeUnit) method 
to avoid breaking backwards compatibility with new 
Configurator.shutdown(LoggerContext, long, TimeUnit) API.
 -  
 -  
 -Fixed issue with filters extending AbstractFilter that did not 
override methods with unrolled varargs.
 -  
 -  
 -Fixed scrambled log messages triggered by nested logging from 
toString() method of a logging parameter object.
 -  
 -  
 -Log4j threads are no longer leaking on Tomcat shutdown.
 -  
 -  
 -When starting on Google App Engine, Interpolator now suppresses the 
NoClassDefFoundError stack trace  for the jvmrunargs lookup.
 -  
 -  
 -When initializing on platforms where JMX is not available, 
Interpolator component no longer prints stack trace for warning messages.
 -  
 -  
 -Unregistering JMX components no longer prints a stack trace when the 
MBean has already been unregistered.
 -  
 -  
 -Support Property values to be specified in configuration as a value 
attribute as well as an element.
 -  
 -  
 -(GC) LoggerConfig now stores configuration properties in a List, not 
a Map to prevent creating temporary Iterator objects. Added method 
LoggerConfig#getPropertyList(), deprecated method #getProperties().
 -  
 -  
 -Fixed class loader deadlock when using async logging and extended 
stack trace pattern.
 -  
 -  
 -Fix to prevent Log4j 2.6.2 and higher from losing exceptions when a 
security manager is present.
 -  
 -  
 -Fixed issue where LogEvent.getContextStack() returned null.
 -  
 -  
 -Prevent deadlock in Async Loggers when queue is full and logged 
Object's toString() logs another message.
 -  
 -  
 -Prevent ArrayIndexOutOfBoundsException in 
ParameterizedMessage.formatTo for single-char or empty messages.
 -  
 -  
 -Fixed issue where 
AsyncLoggerContextSelector+PropertiesConfigurationBuilder defaulted to 
includeLocation=true.
 -  
 -  
 -Prevent SocketAppender memory usage from growing unbounded if it 
cannot connect to a server.
 -  
 -  
 -Prevent NPE in Level.isInRange.
 -  
 -  
 -DynamicThresholdFilter filtered incorrectly when params were passed 
as individual arguments instead of varargs.
 -  
 -  
 -[CronTriggeringPolicy] ConfigurationScheduler scheduled the task 
infinitely after first fire.
 -  
 -  
 -Log4j should not unregister JMX MBeans when log4j2.disable.jmx 
property is true.
 -  
 -  
 -Log4j2 should postpone creating log file until the appender actually 
receives an event.
 -  
 -  
 -Support loading custom plugins from jar files and directories whose 
classpath entries use the "vfs" URL protocol.
 -  
 -  
 -Fix file handle resource leak in 
XmlConfiguration.XmlConfiguration(ConfigurationSource).
 -  
 -  
 -Prevent NPE when dynamically removing filters.
 -  
 -  
 -Attributes were not merged properly in composite configurations.
 -  
 -  
 -Attributes were not merged properly in composite configurations.
 -  
 -  
 -Prevent NPE in RingBufferLogEvent.getFormattedMessage() when used in 
web applications.
 -  
 -  
 -Added ability to disable (date) lookup completely for compatibility 
with other libraries like Camel.
 -  
 -  
 -Added support for setting StatusLogger destination in 
ConfigurationBuilder.
 -  
 -  
 -Allow comma separated agents, host list to be passed to 

[2/9] logging-log4j2 git commit: LOG4J2-1623 Fix XML schema for configuration file

2016-10-17 Thread mikes
LOG4J2-1623  Fix XML schema for configuration file


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/2153a262
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/2153a262
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/2153a262

Branch: refs/heads/master
Commit: 2153a2621a7ccfa8e9eb006ae8482e8d8dfbc6bc
Parents: 705e272
Author: Mikael Ståldal 
Authored: Tue Oct 4 12:04:15 2016 +0200
Committer: Mikael Ståldal 
Committed: Tue Oct 4 12:04:15 2016 +0200

--
 log4j-core/src/main/resources/Log4j-config.xsd | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/2153a262/log4j-core/src/main/resources/Log4j-config.xsd
--
diff --git a/log4j-core/src/main/resources/Log4j-config.xsd 
b/log4j-core/src/main/resources/Log4j-config.xsd
index af13d71..e75cb9e 100644
--- a/log4j-core/src/main/resources/Log4j-config.xsd
+++ b/log4j-core/src/main/resources/Log4j-config.xsd
@@ -38,6 +38,7 @@
 
 
 
+
 
 
 



[3/9] logging-log4j2 git commit: Merge branch 'master' into LOG4J2-1623

2016-10-17 Thread mikes
Merge branch 'master' into LOG4J2-1623


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/94465257
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/94465257
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/94465257

Branch: refs/heads/master
Commit: 94465257cc0e2c3645ce08a72c1dbb64b63ae282
Parents: 2153a26 ce86130
Author: Mikael Ståldal 
Authored: Wed Oct 5 13:01:28 2016 +0200
Committer: Mikael Ståldal 
Committed: Wed Oct 5 13:01:28 2016 +0200

--
 BUILDING.txt | 4 
 1 file changed, 4 insertions(+)
--




[7/9] logging-log4j2 git commit: LOG4J2-1623 Fix Javadoc

2016-10-17 Thread mikes
LOG4J2-1623 Fix Javadoc


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/6482da5b
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/6482da5b
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/6482da5b

Branch: refs/heads/master
Commit: 6482da5b325a8d42bc79ade754a1d5b904c6dcea
Parents: 3064471
Author: Mikael Ståldal 
Authored: Thu Oct 6 13:42:17 2016 +0200
Committer: Mikael Ståldal 
Committed: Thu Oct 6 13:42:17 2016 +0200

--
 .../log4j/core/config/builder/api/ConfigurationBuilder.java | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/6482da5b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder.java
--
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder.java
index b115651..8141c25 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder.java
@@ -369,9 +369,14 @@ public interface ConfigurationBuilder extends Builder setShutdownHook(String flag);
 
 /**
- * Specifies how long time appenders and other plugins will get to 
shutdown when the JVM shuts down.
- * Default is zero. (Not used if {@link #setShutdownHook(String)} is set 
to "disable".)
+ * How long appenders and background tasks will get to shutdown when the 
JVM shuts down.
+ * Default is zero which mean that each appender uses its default timeout, 
and don't wait for background
+ * tasks. Not all appenders will honor this, it is a hint and not an 
absolute guarantee that the shutdown
+ * procedure will not take longer. Setting this too low increase the risk 
of losing outstanding log events
+ * not yet written to the final destination. (Not used if {@link 
#setShutdownHook(String)} is set to "disable".)
  * @return this builder instance.
+ *
+ * @see LoggerContext#stop(long, TimeUnit)
  */
 ConfigurationBuilder setShutdownTimeout(long timeout, TimeUnit 
timeUnit);
 



[9/9] logging-log4j2 git commit: Merge branch 'master' into LOG4J2-1623

2016-10-17 Thread mikes
Merge branch 'master' into LOG4J2-1623

# Conflicts:
#   src/changes/changes.xml


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/19418b37
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/19418b37
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/19418b37

Branch: refs/heads/master
Commit: 19418b37df948609a8852a17f206076048043f6f
Parents: 6482da5 197997a
Author: Mikael Ståldal 
Authored: Mon Oct 17 13:14:16 2016 +0200
Committer: Mikael Ståldal 
Committed: Mon Oct 17 13:14:16 2016 +0200

--
 .../logging/log4j/util/PropertiesUtil.java  | 597 ++-
 .../log4j/core/appender/AbstractAppender.java   |   8 +
 .../log4j/core/appender/ConsoleAppender.java|  23 +-
 .../core/appender/MemoryMappedFileAppender.java |   2 +-
 .../logging/log4j/core/layout/HtmlLayout.java   |  81 +--
 .../logging/log4j/core/lookup/JndiLookup.java   |   5 +-
 .../appender/ConsoleAppenderBuilderTest.java|  80 ++-
 pom.xml |   2 +-
 src/changes/changes.xml |  11 +-
 9 files changed, 446 insertions(+), 363 deletions(-)
--




[8/9] logging-log4j2 git commit: Merge branch 'master' into LOG4J2-1623

2016-10-17 Thread mikes
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/19418b37/src/changes/changes.xml
--
diff --cc src/changes/changes.xml
index 6bd144c,d935048..2922511
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@@ -1,3090 -1,3096 +1,3099 @@@
 -
 -
 -
 -http://maven.apache.org/changes/1.0.0;
 -  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
 -  xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 
http://maven.apache.org/xsd/changes-1.0.0.xsd;>
 -  
 -Changes
 -  
 -  
 -
 -  
 -Console Appender does not pick up Oracle Java 8's sun.stdout.encoding 
and sun.stderr.encoding.
 -  
 -  
 -Fix MemoryMappedFileAppender.createAppender() Javadoc for 
immediateFlush.
 -  
 -  
 -Update JeroMQ from 0.3.5 to 0.3.6.
 -  
 -
 -
 -  
 -Fixed ClassCastException when using JUL logging during shutdown.
 -  
 -  
 -2.7-rc1: RollingFileAppender immediateFlush default value should be 
true, not false.
 -  
 -  
 -Improved performance of context data injector for web applications to 
be on par with standalone applications.
 -  
 -  
 -Introduced new interface LifeCycle2 with stop(long,TimeUnit) method 
to avoid breaking backwards compatibility with new 
Configurator.shutdown(LoggerContext, long, TimeUnit) API.
 -  
 -  
 -Fixed issue with filters extending AbstractFilter that did not 
override methods with unrolled varargs.
 -  
 -  
 -Fixed scrambled log messages triggered by nested logging from 
toString() method of a logging parameter object.
 -  
 -  
 -Log4j threads are no longer leaking on Tomcat shutdown.
 -  
 -  
 -When starting on Google App Engine, Interpolator now suppresses the 
NoClassDefFoundError stack trace  for the jvmrunargs lookup.
 -  
 -  
 -When initializing on platforms where JMX is not available, 
Interpolator component no longer prints stack trace for warning messages.
 -  
 -  
 -Unregistering JMX components no longer prints a stack trace when the 
MBean has already been unregistered.
 -  
 -  
 -Support Property values to be specified in configuration as a value 
attribute as well as an element.
 -  
 -  
 -(GC) LoggerConfig now stores configuration properties in a List, not 
a Map to prevent creating temporary Iterator objects. Added method 
LoggerConfig#getPropertyList(), deprecated method #getProperties().
 -  
 -  
 -Fixed class loader deadlock when using async logging and extended 
stack trace pattern.
 -  
 -  
 -Fix to prevent Log4j 2.6.2 and higher from losing exceptions when a 
security manager is present.
 -  
 -  
 -Fixed issue where LogEvent.getContextStack() returned null.
 -  
 -  
 -Prevent deadlock in Async Loggers when queue is full and logged 
Object's toString() logs another message.
 -  
 -  
 -Prevent ArrayIndexOutOfBoundsException in 
ParameterizedMessage.formatTo for single-char or empty messages.
 -  
 -  
 -Fixed issue where 
AsyncLoggerContextSelector+PropertiesConfigurationBuilder defaulted to 
includeLocation=true.
 -  
 -  
 -Prevent SocketAppender memory usage from growing unbounded if it 
cannot connect to a server.
 -  
 -  
 -Prevent NPE in Level.isInRange.
 -  
 -  
 -DynamicThresholdFilter filtered incorrectly when params were passed 
as individual arguments instead of varargs.
 -  
 -  
 -[CronTriggeringPolicy] ConfigurationScheduler scheduled the task 
infinitely after first fire.
 -  
 -  
 -Log4j should not unregister JMX MBeans when log4j2.disable.jmx 
property is true.
 -  
 -  
 -Log4j2 should postpone creating log file until the appender actually 
receives an event.
 -  
 -  
 -Support loading custom plugins from jar files and directories whose 
classpath entries use the "vfs" URL protocol.
 -  
 -  
 -Fix file handle resource leak in 
XmlConfiguration.XmlConfiguration(ConfigurationSource).
 -  
 -  
 -Prevent NPE when dynamically removing filters.
 -  
 -  
 -Attributes were not merged properly in composite configurations.
 -  
 -  
 -Attributes were not merged properly in composite configurations.
 -  
 -  
 -Prevent NPE in RingBufferLogEvent.getFormattedMessage() when used in 
web applications.
 -  
 -  
 -Added ability to disable (date) lookup completely for compatibility 
with other libraries like Camel.
 -  
 -  
 -Added support for setting StatusLogger destination in 
ConfigurationBuilder.
 -  
 -  
 -Allow comma separated agents, host list to be passed to 

[6/9] logging-log4j2 git commit: [LOG4J2-1641] Update JeroMQ from 0.3.5 to 0.3.6.

2016-10-17 Thread mikes
[LOG4J2-1641] Update JeroMQ from 0.3.5 to 0.3.6.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/8245e544
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/8245e544
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/8245e544

Branch: refs/heads/LOG4J2-1623
Commit: 8245e544be9e44b907dbfa7ebda7fa928d4c51a5
Parents: fc0e07c
Author: ggregory 
Authored: Mon Oct 10 14:12:39 2016 -0700
Committer: ggregory 
Committed: Mon Oct 10 14:12:39 2016 -0700

--
 pom.xml | 2 +-
 src/changes/changes.xml | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/8245e544/pom.xml
--
diff --git a/pom.xml b/pom.xml
index a32f984..fd49ff7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -612,7 +612,7 @@
   
 org.zeromq
 jeromq
-0.3.5
+0.3.6
   
   
 javax.servlet

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/8245e544/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 3288f97..d935048 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -30,6 +30,9 @@
   
 Fix MemoryMappedFileAppender.createAppender() Javadoc for 
immediateFlush.
   
+  
+Update JeroMQ from 0.3.5 to 0.3.6.
+  
 
 
   



[4/9] logging-log4j2 git commit: [LOG4J2-1636] Console Appender does not pick up Oracle Java 8's sun.stdout.encoding and sun.stderr.encoding. This is a partial fix. See discussion in Jira.

2016-10-17 Thread mikes
[LOG4J2-1636] Console Appender does not pick up Oracle Java 8's
sun.stdout.encoding and sun.stderr.encoding. This is a partial fix. See
discussion in Jira.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/d65bf73c
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/d65bf73c
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/d65bf73c

Branch: refs/heads/LOG4J2-1623
Commit: d65bf73c02adbf7e82bd2dc66649bad512b944f2
Parents: eed7c07
Author: Gary Gregory 
Authored: Mon Oct 10 11:20:32 2016 -0700
Committer: Gary Gregory 
Committed: Mon Oct 10 11:20:32 2016 -0700

--
 .../logging/log4j/util/PropertiesUtil.java  |  597 +-
 .../log4j/core/appender/AbstractAppender.java   |8 +
 .../log4j/core/appender/ConsoleAppender.java|   23 +-
 .../appender/ConsoleAppenderBuilderTest.java|   80 +-
 src/changes/changes.xml | 6175 +-
 5 files changed, 3477 insertions(+), 3406 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d65bf73c/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
--
diff --git 
a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java 
b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
index 1bc4e43..af0b29e 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
@@ -1,287 +1,310 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * Consider this class private.
- * 
- * Helps access properties. This utility provides a method to override system 
properties by specifying properties in a
- * properties file.
- * 
- */
-public final class PropertiesUtil {
-
-private static final PropertiesUtil LOG4J_PROPERTIES = new 
PropertiesUtil("log4j2.component.properties");
-
-private final Properties props;
-
-/**
- * Constructs a PropertiesUtil using a given Properties object as its 
source of defined properties.
- *
- * @param props the Properties to use by default
- */
-public PropertiesUtil(final Properties props) {
-this.props = props;
-}
-
-/**
- * Constructs a PropertiesUtil for a given properties file name on the 
classpath. The properties specified in this
- * file are used by default. If a property is not defined in this file, 
then the equivalent system property is used.
- *
- * @param propertiesFileName the location of properties file to load
- */
-public PropertiesUtil(final String propertiesFileName) {
-final Properties properties = new Properties();
-for (final URL url : LoaderUtil.findResources(propertiesFileName)) {
-try (final InputStream in = url.openStream()) {
-properties.load(in);
-} catch (final IOException ioe) {
-LowLevelLogUtil.logException("Unable to read " + 
url.toString(), ioe);
-}
-}
-this.props = properties;
-}
-
-/**
- * Loads and closes the given property input stream. If an error occurs, 
log to the status logger.
- *
- * @param in a property input stream.
- * @param source a source object describing the source, like a resource 
string or a URL.
- * @return a new Properties object
- */
-static Properties loadClose(final InputStream in, final Object source) {
-final Properties props = new Properties();
-if (null != in) {
-try {
-props.load(in);
-} catch (final IOException e) {
-   

[2/9] logging-log4j2 git commit: Javadoc: Use the active voice.

2016-10-17 Thread mikes
Javadoc: Use the active voice.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/eed7c071
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/eed7c071
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/eed7c071

Branch: refs/heads/LOG4J2-1623
Commit: eed7c07182384a7530268891d2b26a0368181eaa
Parents: 118abf4
Author: Gary Gregory 
Authored: Fri Oct 7 15:15:43 2016 -0700
Committer: Gary Gregory 
Committed: Fri Oct 7 15:15:43 2016 -0700

--
 .../java/org/apache/logging/log4j/core/layout/HtmlLayout.java| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/eed7c071/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/HtmlLayout.java
--
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/HtmlLayout.java 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/HtmlLayout.java
index 2acf335..6cd64d3 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/HtmlLayout.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/HtmlLayout.java
@@ -132,7 +132,7 @@ public final class HtmlLayout extends AbstractStringLayout {
 }
 
 /**
- * Format as a String.
+ * Formats as a String.
  *
  * @param event The Logging Event.
  * @return A String containing the LogEvent as HTML.
@@ -325,7 +325,7 @@ public final class HtmlLayout extends AbstractStringLayout {
 }
 
 /**
- * Create an HTML Layout.
+ * Creates an HTML Layout.
  * @param locationInfo If "true", location information will be included. 
The default is false.
  * @param title The title to include in the file header. If none is 
specified the default title will be used.
  * @param contentType The content type. Defaults to "text/html".



[1/9] logging-log4j2 git commit: Refactor use of Strings.LINE_SEPARATOR.

2016-10-17 Thread mikes
Repository: logging-log4j2
Updated Branches:
  refs/heads/LOG4J2-1623 6482da5b3 -> 19418b37d


Refactor use of Strings.LINE_SEPARATOR.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/118abf47
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/118abf47
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/118abf47

Branch: refs/heads/LOG4J2-1623
Commit: 118abf47142a3a7ea05d980aba8aded96df8d2f2
Parents: 2da9dfa
Author: Gary Gregory 
Authored: Fri Oct 7 15:15:02 2016 -0700
Committer: Gary Gregory 
Committed: Fri Oct 7 15:15:02 2016 -0700

--
 .../logging/log4j/core/layout/HtmlLayout.java   | 77 +++-
 1 file changed, 44 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/118abf47/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/HtmlLayout.java
--
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/HtmlLayout.java 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/HtmlLayout.java
index 67593e6..2acf335 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/HtmlLayout.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/HtmlLayout.java
@@ -258,6 +258,16 @@ public final class HtmlLayout extends AbstractStringLayout 
{
 }
 }
 
+private StringBuilder appendLs(StringBuilder sbuilder, String s) {
+sbuilder.append(s).append(Strings.LINE_SEPARATOR);
+return sbuilder;
+}
+
+private StringBuilder append(StringBuilder sbuilder, String s) {
+sbuilder.append(s);
+return sbuilder;
+}
+
 /**
  * Returns appropriate HTML headers.
  * @return The header as a byte array.
@@ -265,38 +275,39 @@ public final class HtmlLayout extends 
AbstractStringLayout {
 @Override
 public byte[] getHeader() {
 final StringBuilder sbuf = new StringBuilder();
-sbuf.append("http://www.w3.org/TR/html4/loose.dtd\;>");
-sbuf.append(Strings.LINE_SEPARATOR);
-sbuf.append("").append(Strings.LINE_SEPARATOR);
-sbuf.append("").append(Strings.LINE_SEPARATOR);
-sbuf.append("").append(Strings.LINE_SEPARATOR);
-
sbuf.append("").append(title).append("").append(Strings.LINE_SEPARATOR);
-sbuf.append("").append(Strings.LINE_SEPARATOR);
-sbuf.append("").append(Strings.LINE_SEPARATOR);
-sbuf.append("").append(Strings.LINE_SEPARATOR);
-sbuf.append("").append(Strings.LINE_SEPARATOR);
-sbuf.append("").append(Strings.LINE_SEPARATOR);
-sbuf.append("").append(Strings.LINE_SEPARATOR);
-sbuf.append("Log session start time " + new java.util.Date() + 
"").append(Strings.LINE_SEPARATOR);
-sbuf.append("").append(Strings.LINE_SEPARATOR);
-sbuf.append(
-"");
-sbuf.append(Strings.LINE_SEPARATOR);
-sbuf.append("").append(Strings.LINE_SEPARATOR);
-sbuf.append("Time").append(Strings.LINE_SEPARATOR);
-sbuf.append("Thread").append(Strings.LINE_SEPARATOR);
-sbuf.append("Level").append(Strings.LINE_SEPARATOR);
-sbuf.append("Logger").append(Strings.LINE_SEPARATOR);
+append(sbuf, "http://www.w3.org/TR/html4/loose.dtd\;>");
+appendLs(sbuf, "");
+appendLs(sbuf, "");
+append(sbuf, "");
+append(sbuf, "").append(title);
+appendLs(sbuf, "");
+appendLs(sbuf, "");
+appendLs(sbuf, "");
+appendLs(sbuf, "");
+appendLs(sbuf, "");
+appendLs(sbuf, "");
+appendLs(sbuf, "");
+appendLs(sbuf, "Log session start time " + new java.util.Date() + 
"");
+appendLs(sbuf, "");
+appendLs(sbuf,
+"");
+appendLs(sbuf, "");
+appendLs(sbuf, "Time");
+appendLs(sbuf, "Thread");
+appendLs(sbuf, "Level");
+appendLs(sbuf, "Logger");
 if (locationInfo) {
-sbuf.append("File:Line").append(Strings.LINE_SEPARATOR);
+appendLs(sbuf, "File:Line");

[9/9] logging-log4j2 git commit: Merge branch 'master' into LOG4J2-1623

2016-10-17 Thread mikes
Merge branch 'master' into LOG4J2-1623

# Conflicts:
#   src/changes/changes.xml


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/19418b37
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/19418b37
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/19418b37

Branch: refs/heads/LOG4J2-1623
Commit: 19418b37df948609a8852a17f206076048043f6f
Parents: 6482da5 197997a
Author: Mikael Ståldal 
Authored: Mon Oct 17 13:14:16 2016 +0200
Committer: Mikael Ståldal 
Committed: Mon Oct 17 13:14:16 2016 +0200

--
 .../logging/log4j/util/PropertiesUtil.java  | 597 ++-
 .../log4j/core/appender/AbstractAppender.java   |   8 +
 .../log4j/core/appender/ConsoleAppender.java|  23 +-
 .../core/appender/MemoryMappedFileAppender.java |   2 +-
 .../logging/log4j/core/layout/HtmlLayout.java   |  81 +--
 .../logging/log4j/core/lookup/JndiLookup.java   |   5 +-
 .../appender/ConsoleAppenderBuilderTest.java|  80 ++-
 pom.xml |   2 +-
 src/changes/changes.xml |  11 +-
 9 files changed, 446 insertions(+), 363 deletions(-)
--




[5/9] logging-log4j2 git commit: [LOG4J2-1639 ]Fix MemoryMappedFileAppender.createAppender() Javadoc for immediateFlush.

2016-10-17 Thread mikes
[LOG4J2-1639 ]Fix MemoryMappedFileAppender.createAppender() Javadoc for
immediateFlush.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/fc0e07c2
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/fc0e07c2
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/fc0e07c2

Branch: refs/heads/LOG4J2-1623
Commit: fc0e07c23c23a1a12dd379a7c96cadf9d05f7d35
Parents: d65bf73
Author: ggregory 
Authored: Mon Oct 10 13:39:43 2016 -0700
Committer: ggregory 
Committed: Mon Oct 10 13:39:43 2016 -0700

--
 .../logging/log4j/core/appender/MemoryMappedFileAppender.java | 2 +-
 src/changes/changes.xml   | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fc0e07c2/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppender.java
--
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppender.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppender.java
index f12e8b2..1c8e0d2 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppender.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppender.java
@@ -122,7 +122,7 @@ public final class MemoryMappedFileAppender extends 
AbstractOutputStreamAppender
  *"true".
  * @param name The name of the Appender.
  * @param immediateFlush "true" if the contents should be flushed on every 
write, "false" otherwise. The default is
- *"true".
+ *"false".
  * @param regionLengthStr The buffer size, defaults to {@value 
MemoryMappedFileManager#DEFAULT_REGION_LENGTH}.
  * @param ignore If {@code "true"} (default) exceptions encountered when 
appending events are logged; otherwise they
  *are propagated to the caller.

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fc0e07c2/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 659440d..3288f97 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -27,6 +27,9 @@
   
 Console Appender does not pick up Oracle Java 8's sun.stdout.encoding 
and sun.stderr.encoding.
   
+  
+Fix MemoryMappedFileAppender.createAppender() Javadoc for 
immediateFlush.
+  
 
 
   



[3/9] logging-log4j2 git commit: [LOG4J2-1636] Console Appender does not pick up Oracle Java 8's sun.stdout.encoding and sun.stderr.encoding. This is a partial fix. See discussion in Jira.

2016-10-17 Thread mikes
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d65bf73c/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index cd2f379..659440d 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -1,3085 +1,3090 @@
-
-
-
-http://maven.apache.org/changes/1.0.0;
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
-  xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 
http://maven.apache.org/xsd/changes-1.0.0.xsd;>
-  
-Changes
-  
-  
-
-  
-Fixed ClassCastException when using JUL logging during shutdown.
-  
-  
-2.7-rc1: RollingFileAppender immediateFlush default value should be 
true, not false.
-  
-  
-Improved performance of context data injector for web applications to 
be on par with standalone applications.
-  
-  
-Introduced new interface LifeCycle2 with stop(long,TimeUnit) method to 
avoid breaking backwards compatibility with new 
Configurator.shutdown(LoggerContext, long, TimeUnit) API.
-  
-  
-Fixed issue with filters extending AbstractFilter that did not 
override methods with unrolled varargs.
-  
-  
-Fixed scrambled log messages triggered by nested logging from 
toString() method of a logging parameter object.
-  
-  
-Log4j threads are no longer leaking on Tomcat shutdown.
-  
-  
-When starting on Google App Engine, Interpolator now suppresses the 
NoClassDefFoundError stack trace  for the jvmrunargs lookup.
-  
-  
-When initializing on platforms where JMX is not available, 
Interpolator component no longer prints stack trace for warning messages.
-  
-  
-Unregistering JMX components no longer prints a stack trace when the 
MBean has already been unregistered.
-  
-  
-Support Property values to be specified in configuration as a value 
attribute as well as an element.
-  
-  
-(GC) LoggerConfig now stores configuration properties in a List, not a 
Map to prevent creating temporary Iterator objects. Added method 
LoggerConfig#getPropertyList(), deprecated method #getProperties().
-  
-  
-Fixed class loader deadlock when using async logging and extended 
stack trace pattern.
-  
-  
-Fix to prevent Log4j 2.6.2 and higher from losing exceptions when a 
security manager is present.
-  
-  
-Fixed issue where LogEvent.getContextStack() returned null.
-  
-  
-Prevent deadlock in Async Loggers when queue is full and logged 
Object's toString() logs another message.
-  
-  
-Prevent ArrayIndexOutOfBoundsException in 
ParameterizedMessage.formatTo for single-char or empty messages.
-  
-  
-Fixed issue where 
AsyncLoggerContextSelector+PropertiesConfigurationBuilder defaulted to 
includeLocation=true.
-  
-  
-Prevent SocketAppender memory usage from growing unbounded if it 
cannot connect to a server.
-  
-  
-Prevent NPE in Level.isInRange.
-  
-  
-DynamicThresholdFilter filtered incorrectly when params were passed as 
individual arguments instead of varargs.
-  
-  
-[CronTriggeringPolicy] ConfigurationScheduler scheduled the task 
infinitely after first fire.
-  
-  
-Log4j should not unregister JMX MBeans when log4j2.disable.jmx 
property is true.
-  
-  
-Log4j2 should postpone creating log file until the appender actually 
receives an event.
-  
-  
-Support loading custom plugins from jar files and directories whose 
classpath entries use the "vfs" URL protocol.
-  
-  
-Fix file handle resource leak in 
XmlConfiguration.XmlConfiguration(ConfigurationSource).
-  
-  
-Prevent NPE when dynamically removing filters.
-  
-  
-Attributes were not merged properly in composite configurations.
-  
-  
-Attributes were not merged properly in composite configurations.
-  
-  
-Prevent NPE in RingBufferLogEvent.getFormattedMessage() when used in 
web applications.
-  
-  
-Added ability to disable (date) lookup completely for compatibility 
with other libraries like Camel.
-  
-  
-Added support for setting StatusLogger destination in 
ConfigurationBuilder.
-  
-  
-Allow comma separated agents, host list to be passed to FlumeAppender.
-  
-  
-Merging configurations failed with an NPE when comparing Nodes with 
different attributes.
-  
-  
-Fixed improper header in CsvParameterLayout.
-  
-  
-Documented that JVM Input Arguments Lookup (JMX) is not available on 
Google App Engine.
-  
-  
-(GC) Added method getParameter() to ObjectMessage (and 

[7/9] logging-log4j2 git commit: Use try-with-resources.

2016-10-17 Thread mikes
Use try-with-resources.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/197997ac
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/197997ac
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/197997ac

Branch: refs/heads/LOG4J2-1623
Commit: 197997ac35217369cdcc881c258cfcbd5db6a258
Parents: 8245e54
Author: ggregory 
Authored: Mon Oct 10 14:21:49 2016 -0700
Committer: ggregory 
Committed: Mon Oct 10 14:21:49 2016 -0700

--
 .../java/org/apache/logging/log4j/core/lookup/JndiLookup.java   | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/197997ac/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/JndiLookup.java
--
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/JndiLookup.java 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/JndiLookup.java
index 35c4f9d..3dbef43 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/JndiLookup.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/JndiLookup.java
@@ -50,15 +50,12 @@ public class JndiLookup extends AbstractLookup {
 return null;
 }
 final String jndiName = convertJndiName(key);
-final JndiManager jndiManager = JndiManager.getDefaultManager();
-try {
+try (final JndiManager jndiManager = JndiManager.getDefaultManager()) {
 final Object value = jndiManager.lookup(jndiName);
 return value == null ? null : String.valueOf(value);
 } catch (final NamingException e) {
 LOGGER.warn(LOOKUP, "Error looking up JNDI resource [{}].", 
jndiName, e);
 return null;
-} finally {
-jndiManager.close();
 }
 }