You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by rg...@apache.org on 2010/05/13 08:31:09 UTC

svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...

Author: rgoers
Date: Thu May 13 06:31:04 2010
New Revision: 943816

URL: http://svn.apache.org/viewvc?rev=943816&view=rev
Log:
First version

Added:
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/LICENSE
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/NOTICE
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/pom.xml
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/logging/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/logging/log4j/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/logging/log4j/facade/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/test/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/test/java/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/pom.xml
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Level.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/LogManager.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Logger.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/MDC.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Marker.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/NDC.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/internal/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/internal/StatusConsoleListener.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/internal/StatusData.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/internal/StatusListener.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/internal/StatusLogger.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/Message.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/ObjectMessage.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/SimpleMessage.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/resources/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/resources/LICENSE
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/resources/NOTICE
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/LoggerTest.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/SimpleLogger.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/java/org/apache/logging/log4j/SimpleLoggerContext.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/resources/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/resources/META-INF/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/test/resources/META-INF/log4j-provider.xml
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/LICENSE
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/NOTICE
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/build.xml
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/output/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/output/PatternParser_mdc
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/output/filtered
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/output/patternLayout.mdc.2
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/output/patternLayout16.log
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/output/temp
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/pom.xml
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/changes/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/changes/changes.xml
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/Appender.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/ErrorHandler.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/Filter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/Layout.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/Log4jLogEvent.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/LogEventFactory.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/Logger.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/LoggingException.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/AppenderBase.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/AppenderRuntimeException.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/DefaultErrorHandler.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/FileAppender.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/OutputStreamAppender.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/AppenderControl.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/BaseConfiguration.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/Configuration.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationException.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/DefaultConfiguration.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/LoggerConfig.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/Node.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/Order.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/XMLConfiguration.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/XMLConfigurationFactory.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/plugins/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginFactory.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginType.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/FilterBase.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/MDCFilter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/ThresholdFilter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/OptionConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/LayoutBase.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/PatternLayout.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/CachedDateFormat.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/ClassNamePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/ConverterKeys.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/DatePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/FileDatePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/FileLocationPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/FormattingInfo.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/FullLocationPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/IntegerPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/LevelPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/LineLocationPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/LineSeparatorPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/LiteralPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/LogEventPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/LoggerPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/MDCPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/MessagePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/MethodLocationPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/NDCPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/NameAbbreviator.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/NamePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/PatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/PatternParser.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/RelativeTimePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/SequenceNumberPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/ThreadPatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/ThrowablePatternConverter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/pattern/package.html
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/resources/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/resources/META-INF/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/resources/META-INF/LICENSE
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/resources/META-INF/NOTICE
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/resources/META-INF/log4j-provider.xml
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/site/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/site/resources/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/site/resources/css/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/site/resources/css/site.css
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/site/resources/images/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/site/resources/images/logo.jpg   (with props)
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/site/resources/images/ls-logo.jpg   (with props)
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/site/site.xml
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/BasicConfigurationFactory.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/SimplePerfTest.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/ThreadedPerfTest.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/Timer.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/config/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/config/XMLConfigurationTest.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/layout/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/layout/pattern/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/layout/pattern/PatternParserTest.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/AbsoluteDateAndTimeFilter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/AbsoluteTimeFilter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/Compare.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/ControlFilter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/Filter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/ISO8601Filter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/JunitTestRunnerFilter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/LineNumberFilter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/MDCOrderFilter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/RelativeTimeFilter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/SunReflectFilter.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/Transformer.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/util/UnexpectedFormatException.java
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/log4j-test1.xml
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/org/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/org/apache/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/org/apache/log4j/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/witness/
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/resources/witness/PatternParser_mdc
    logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/pom.xml

Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/LICENSE
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/LICENSE?rev=943816&view=auto
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/LICENSE (added)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/LICENSE Thu May 13 06:31:04 2010
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright 1999-2005 The Apache Software Foundation
+
+   Licensed 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.

Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/NOTICE
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/NOTICE?rev=943816&view=auto
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/NOTICE (added)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/NOTICE Thu May 13 06:31:04 2010
@@ -0,0 +1,5 @@
+Apache log4j Enhanced PatternLayout for log4j 1.2.x
+Copyright 2007 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file

Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/pom.xml?rev=943816&view=auto
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/pom.xml (added)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/pom.xml Thu May 13 06:31:04 2010
@@ -0,0 +1,48 @@
+<!--
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.logging</groupId>
+    <artifactId>log4j2</artifactId>
+    <version>1.99.0-SNAPSHOT</version>
+  </parent>
+  <groupId>org.apache.logging</groupId>
+  <artifactId>log4j12-api</artifactId>
+  <packaging>jar</packaging>
+  <name>Log4J Compatibility API</name>
+  <description>The Log4J Compatibility API</description>
+</build>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.3.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+ <distributionManagement>
+    <site>
+      <id>apache.website</id>
+      <url>scp://people.apache.org/home/carnold/public_html/log4j/companions/pattern-layout</url>
+    </site>
+  </distributionManagement>
+
+</project>
+

Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/pom.xml?rev=943816&view=auto
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/pom.xml (added)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/pom.xml Thu May 13 06:31:04 2010
@@ -0,0 +1,47 @@
+<!--
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.logging</groupId>
+    <artifactId>log4j2</artifactId>
+    <version>1.99.0-SNAPSHOT</version>
+  </parent>
+  <groupId>org.apache.logging</groupId>
+  <artifactId>log4j2-api</artifactId>
+  <packaging>jar</packaging>
+  <name>Log4J API</name>
+  <description>The Log4J API</description>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.3.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+ <distributionManagement>
+    <site>
+      <id>apache.website</id>
+      <url>scp://people.apache.org/home/carnold/public_html/log4j/companions/pattern-layout</url>
+    </site>
+  </distributionManagement>
+
+</project>
+

Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Level.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Level.java?rev=943816&view=auto
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Level.java (added)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Level.java Thu May 13 06:31:04 2010
@@ -0,0 +1,105 @@
+/*
+ * 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;
+
+/**
+ * Levels used for identifying the severity of an event. Levels are organized from most specific to least:<br>
+ * OFF<br>
+ * FATAL<br>
+ * ERROR<br>
+ * WARN<br>
+ * INFO<br>
+ * DEBUG<br>
+ * TRACE<br>
+ *
+ * Typically, configuring a level in a filter or on a logger will cause logging events of that level and those
+ * that are more specific to pass through the filter.
+ * A special level, ALL, is guaranteed to capture all levels when used in logging configurations.
+ */
+public enum Level {
+    OFF(0), FATAL(1), ERROR(2), WARN(3), INFO(4), DEBUG(5), TRACE(6), ALL(Integer.MAX_VALUE);
+
+    private final int intLevel;
+
+    private Level(int val) {
+        intLevel = val;
+    }
+
+    /**
+     * Convert the string passed as argument to a level. If the
+     * conversion fails, then this method returns {@link #DEBUG}.
+     *
+     * @return the Level associate with the String.
+     */
+    public static Level toLevel(String sArg) {
+        return toLevel(sArg, DEBUG);
+    }
+
+    /**
+     * Convert the string passed as argument to a level. If the
+     * conversion fails, then this method returns the value of
+     * <code>defaultLevel</code>.
+     */
+    public static Level toLevel(String sArg, Level defaultLevel) {
+        if (sArg == null) {
+            return defaultLevel;
+        }
+
+        Level level = valueOf(sArg);
+        return (level == null) ? defaultLevel : level;
+    }
+
+    /**
+     * Compares the specified Level against this one.
+     * @param level The level to check.
+     * @return True if the passed Level is more general or the same as this Level.
+     */
+    public boolean greaterOrEqual(Level level) {
+        return (intLevel <= level.intLevel);
+    }
+
+    /**
+     * Compares the specified Level against this one.
+     * @param level The level to check.
+     * @return True if the passed Level is more general or the same as this Level.
+     */
+    public boolean greaterOrEqual(int level) {
+        return (intLevel <= level);
+    }
+
+    /**
+     * Compares the specified Level against this one.
+     * @param level The level to check.
+     * @return True if the passed Level is more specific or the same as this Level.
+     */
+    public boolean lessOrEqual(Level level) {
+        return (intLevel <= level.intLevel);
+    }
+
+    /**
+     * Compares the specified Level against this one.
+     * @param level The level to check.
+     * @return True if the passed Level is more specific or the same as this Level.
+     */
+    public boolean lessOrEqual(int level) {
+        return (intLevel <= level);
+    }
+
+    public int intLevel() {
+        return intLevel;
+    }
+}

Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/LogManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/LogManager.java?rev=943816&view=auto
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/LogManager.java (added)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/LogManager.java Thu May 13 06:31:04 2010
@@ -0,0 +1,123 @@
+package org.apache.logging.log4j;
+
+import org.apache.logging.log4j.internal.StatusLogger;
+import org.apache.logging.log4j.spi.LoggerContext;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * The anchor point for the logging system.
+ */
+public final class LogManager {
+
+    private static final String LOGGER_RESOURCE = "META-INF/log4j-provider.xml";
+    private static final String LOG_MANAGER_CLASS = "LoggerContextClass";
+    private static final String API_VERSION = "Log4jAPIVersion";
+    private static final String[] COMPATIBLE_API_VERSIONS = {
+        "1.99.0"
+    };
+
+    private static LoggerContext manager;
+
+    private static Logger logger = StatusLogger.getLogger();
+
+    /**
+     * Prevent instantiation
+     */
+    private LogManager() {
+    }
+
+
+    /**
+     * Scans the classpath to find all logging implementation. Currently, only one will
+     * be used but this could be extended to allow multiple implementations to be used.
+     */
+    static {
+        ClassLoader cl = findClassLoader();
+        List<LoggerContext> managers = new ArrayList<LoggerContext>();
+
+        Enumeration enumResources = null;
+        try {
+            enumResources = cl.getResources(LOGGER_RESOURCE);
+        }
+        catch (IOException e) {
+            logger.fatal("Unable to locate " + LOGGER_RESOURCE, e);
+        }
+
+        if (enumResources != null) {
+            while (enumResources.hasMoreElements()) {
+                Properties props = new Properties();
+                URL url = (URL) enumResources.nextElement();
+                try {
+                    props.loadFromXML(url.openStream());
+                } catch (IOException ioe) {
+                    logger.error("Unable to read " + url.toString(), ioe);
+                }
+                if (!validVersion(props.getProperty(API_VERSION))) {
+                    continue;
+                }
+                String className = props.getProperty(LOG_MANAGER_CLASS);
+                if (className != null) {
+                    try {
+                        Class clazz = Class.forName(className);
+                        managers.add((LoggerContext) clazz.newInstance());
+                    } catch (ClassNotFoundException cnfe) {
+                        logger.error("Unable to locate class " + className + " specified in " + url.toString(), cnfe);
+                    } catch (InstantiationException ie) {
+                        logger.error("Unable to create class " + className + " specified in " + url.toString(), ie);
+                    } catch (IllegalAccessException iae) {
+                        logger.error("Unable to create class " + className + " specified in " + url.toString(), iae);
+                    } catch (Exception e) {
+                        logger.error("Unable to create class " + className + " specified in " + url.toString(), e);
+                        e.printStackTrace();
+                    }
+                }
+            }
+            if (managers.size() != 1) {
+                logger.fatal("Unable to locate a logging implementation");
+            } else {
+                manager = managers.get(0);
+            }
+        } else {
+            logger.fatal("Unable to locate a logging implementation");
+        }
+    }
+
+    /**
+     * Return a Logger with the specified name.
+     *
+     * @param name The logger name.
+     * @return The Logger.
+     */
+    public static Logger getLogger(String name) {
+        return manager.getLogger(name);
+    }
+
+    public static LoggerContext getContext() {
+        return manager;
+    }
+
+    private static ClassLoader findClassLoader() {
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        if (cl == null) {
+            cl = LogManager.class.getClassLoader();
+        }
+
+        return cl;
+    }
+
+    private static boolean validVersion(String version) {
+        for (String v : COMPATIBLE_API_VERSIONS) {
+            if (version.startsWith(v)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+}

Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Logger.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Logger.java?rev=943816&view=auto
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Logger.java (added)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Logger.java Thu May 13 06:31:04 2010
@@ -0,0 +1,612 @@
+/*
+* 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;
+
+import org.apache.logging.log4j.message.Message;
+
+/**
+ * This is the central class in the log4j package. Most logging
+ * operations, except configuration, are done through this class.
+ */
+public interface Logger {
+
+  static Marker FLOW_MARKER = Marker.getMarker("FLOW");
+  static Marker ENTRY_MARKER = Marker.getMarker("ENTRY", FLOW_MARKER);
+  static Marker EXIT_MARKER = Marker.getMarker("EXIT", FLOW_MARKER);
+
+  static Marker EXCEPTION_MARKER = Marker.getMarker("EXCEPTION");
+  static Marker THROWING_MARKER = Marker.getMarker("THROWING", EXCEPTION_MARKER);
+  static Marker CATCHING_MARKER = Marker.getMarker("CATCHING", EXCEPTION_MARKER);
+
+  /**
+   * Log entry to a method.
+   * @param params The parameters to the method.
+   */
+  void entry(Object... params);
+
+  /**
+   * Log exit from a method.
+   */
+  void exit();
+
+  /**
+   * Log exiting from a method with the result.
+   * @param result The result being returned from the method call.
+   */
+  void exit(Object result);
+
+  /**
+   * Log an exception or error to be thrown.
+   * @param t The Throwable.
+   */
+  void throwing(Throwable t);
+
+  /**
+   * Log an exception or error to be thrown.
+   * @param level The logging Level.
+   * @param t The Throwable.
+   */
+  void throwing(Level level, Throwable t);
+
+  /**
+   * Log an exception or error that has been caught.
+   * @param t The Throwable.
+   */
+  void catching(Throwable t);
+
+  /**
+   * Log an exception or error that has been caught.
+   * @param level The logging Level.
+   * @param t The Throwable.
+   */
+  void catching(Level level, Throwable t);
+
+  /**
+   * Log a message object with the {@link org.apache.logging.log4j.Level#TRACE TRACE} level.
+   *
+   * @param message the message object to log.
+   */
+  void trace(String message);
+
+  /**
+   * Log a message at the <code>TRACE</code> level including the
+   * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
+   * <p/>
+   * <p>
+   * See {@link #debug(String)} form for more detailed information.
+   * </p>
+   *
+   * @param message the message object to log.
+   * @param t       the exception to log, including its stack trace.
+   */
+  void trace(String message, Throwable t);
+
+  /**
+   * Log a message object with the {@link org.apache.logging.log4j.Level#TRACE TRACE} level.
+   *
+   * @param message the message object to log.
+   */
+  void trace(Object message);
+
+  /**
+   * Log a message at the <code>TRACE</code> level including the
+   * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
+   * <p/>
+   * <p>
+   * See {@link #debug(String)} form for more detailed information.
+   * </p>
+   *
+   * @param message the message object to log.
+   * @param t       the exception to log, including its stack trace.
+   */
+  void trace(Object message, Throwable t);
+
+  /**
+   * Log a message with parameters at the <code>TRACE</code> level.
+   * @param message the message to log.
+   * @param params parameters to the message.
+   */
+  void trace(String message, Object... params);
+
+  /**
+   * Check whether this Logger is enabled for the TRACE  Level.
+   *
+   * @return boolean - <code>true</code> if this Logger is enabled for level
+   *         TRACE, <code>false</code> otherwise.
+   */
+  boolean isTraceEnabled();
+
+  /**
+   * Check whether this Logger is enabled for the TRACE  Level.
+   *
+   * @param marker The marker data specific to this log statement.
+   * @return boolean - <code>true</code> if this Logger is enabled for level
+   *         TRACE, <code>false</code> otherwise.
+   */
+  boolean isTraceEnabled(Marker marker);
+
+  /**
+   * Log a message with the specific Marker at the TRACE level.
+   *
+   * @param msg the message string to be logged
+   */
+  void trace(Message msg);
+
+  /**
+   * Log a message with the specific Marker at the TRACE level.
+   *
+   * @param msg the message string to be logged
+   * @param t   A Throwable or null.
+   */
+  void trace(Message msg, Throwable t);
+
+  /**
+   * Log a message with the specific Marker at the TRACE level.
+   *
+   * @param marker the marker data specific to this log statement
+   * @param msg    the message string to be logged
+   */
+  void trace(Marker marker, Message msg);
+
+  /**
+   * Log a message with the specific Marker at the TRACE level.
+   *
+   * @param marker the marker data specific to this log statement
+   * @param msg    the message string to be logged
+   * @param t      A Throwable or null.
+   */
+  void trace(Marker marker, Message msg, Throwable t);
+
+  /**
+   * Log a message object with the {@link org.apache.logging.log4j.Level#DEBUG DEBUG} level.
+   *
+   * @param message the message object to log.
+   */
+  void debug(String message);
+
+  /**
+   * Log a message at the <code>DEBUG</code> level including the
+   * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
+   *
+   * @param message the message to log.
+   * @param t       the exception to log, including its stack trace.
+   */
+  void debug(String message, Throwable t);
+
+  /**
+   * Log a message object with the {@link org.apache.logging.log4j.Level#DEBUG DEBUG} level.
+   *
+   * @param message the message object to log.
+   */
+  void debug(Object message);
+
+  /**
+   * Log a message at the <code>DEBUG</code> level including the
+   * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
+   *
+   * @param message the message to log.
+   * @param t       the exception to log, including its stack trace.
+   */
+  void debug(Object message, Throwable t);
+
+  /**
+   * Log a message with parameters at the <code>DEBUG</code> level.
+   * @param message the message to log.
+   * @param params parameters to the message.
+   */
+  void debug(String message, Object... params);
+
+  /**
+   * Check whether this Logger is enabled for the DEBUG Level.
+   *
+   * @return boolean - <code>true</code> if this Logger is enabled for level
+   *         DEBUG, <code>false</code> otherwise.
+   */
+  boolean isDebugEnabled();
+
+  /**
+   * Check whether this Logger is enabled for the DEBUG Level.
+   *
+   * @param marker The marker data specific to this log statement.
+   * @return boolean - <code>true</code> if this Logger is enabled for level
+   *         DEBUG, <code>false</code> otherwise.
+   */
+  boolean isDebugEnabled(Marker marker);
+
+  /**
+   * Log a message with the specific Marker at the DEBUG level.
+   *
+   * @param msg the message string to be logged
+   */
+  void debug(Message msg);
+
+  /**
+   * Log a message with the specific Marker at the DEBUG level.
+   *
+   * @param msg the message string to be logged
+   * @param t   A Throwable or null.
+   */
+  void debug(Message msg, Throwable t);
+
+  /**
+   * Log a message with the specific Marker at the DEBUG level.
+   *
+   * @param marker the marker data specific to this log statement
+   * @param msg    the message string to be logged
+   */
+  void debug(Marker marker, Message msg);
+
+  /**
+   * Log a message with the specific Marker at the DEBUG level.
+   *
+   * @param marker the marker data specific to this log statement
+   * @param msg    the message string to be logged
+   * @param t      A Throwable or null.
+   */
+  void debug(Marker marker, Message msg, Throwable t);
+
+  /**
+   * Log a message object with the {@link org.apache.logging.log4j.Level#INFO INFO} level.
+   *
+   * @param message the message object to log.
+   */
+  void info(String message);
+
+  /**
+   * Log a message at the <code>INFO</code> level including the
+   * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
+   *
+   * @param message the message object to log.
+   * @param t       the exception to log, including its stack trace.
+   */
+  void info(String message, Throwable t);
+
+  /**
+   * Log a message object with the {@link org.apache.logging.log4j.Level#INFO INFO} level.
+   *
+   * @param message the message object to log.
+   */
+  void info(Object message);
+
+  /**
+   * Log a message at the <code>INFO</code> level including the
+   * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
+   *
+   * @param message the message object to log.
+   * @param t       the exception to log, including its stack trace.
+   */
+  void info(Object message, Throwable t);
+
+  /**
+   * Log a message with parameters at the <code>INFO</code> level.
+   * @param message the message to log.
+   * @param params parameters to the message.
+   */
+  void info(String message, Object... params);
+
+  /**
+   * Check whether this Logger is enabled for the INFO Level.
+   *
+   * @return boolean - <code>true</code> if this Logger is enabled for level
+   *         INFO, <code>false</code> otherwise.
+   */
+  boolean isInfoEnabled();
+
+  /**
+   * Check whether this Logger is enabled for the INFO Level.
+   *
+   * @param marker The marker data specific to this log statement.
+   * @return boolean - <code>true</code> if this Logger is enabled for level
+   *         INFO, <code>false</code> otherwise.
+   */
+  boolean isInfoEnabled(Marker marker);
+
+  /**
+   * Log a message with the specific Marker at the TRACE level.
+   *
+   * @param msg the message string to be logged
+   */
+  void info(Message msg);
+
+  /**
+   * Log a message with the specific Marker at the INFO level.
+   *
+   * @param msg the message string to be logged
+   * @param t   A Throwable or null.
+   */
+  void info(Message msg, Throwable t);
+
+  /**
+   * Log a message with the specific Marker at the INFO level.
+   *
+   * @param marker the marker data specific to this log statement
+   * @param msg    the message string to be logged
+   */
+  void info(Marker marker, Message msg);
+
+  /**
+   * Log a message with the specific Marker at the INFO level.
+   *
+   * @param marker the marker data specific to this log statement
+   * @param msg    the message string to be logged
+   * @param t      A Throwable or null.
+   */
+  void info(Marker marker, Message msg, Throwable t);
+
+ /**
+   * Log a message object with the {@link org.apache.logging.log4j.Level#WARN WARN} level.
+   *
+   * @param message the message object to log.
+   */
+  void warn(String message);
+
+  /**
+   * Log a message at the <code>WARN</code> level including the
+   * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
+   *
+   * @param message the message object to log.
+   * @param t       the exception to log, including its stack trace.
+   */
+  void warn(String message, Throwable t);
+
+ /**
+   * Log a message object with the {@link org.apache.logging.log4j.Level#WARN WARN} level.
+   *
+   * @param message the message object to log.
+   */
+  void warn(Object message);
+
+  /**
+   * Log a message at the <code>WARN</code> level including the
+   * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
+   *
+   * @param message the message object to log.
+   * @param t       the exception to log, including its stack trace.
+   */
+  void warn(Object message, Throwable t);
+
+  /**
+   * Log a message with parameters at the <code>WARN</code> level.
+   * @param message the message to log.
+   * @param params parameters to the message.
+   */
+  void warn(String message, Object... params);
+
+  /**
+   * Check whether this Logger is enabled for the WARN Level.
+   *
+   * @return boolean - <code>true</code> if this Logger is enabled for level
+   *         WARN, <code>false</code> otherwise.
+   */
+  boolean isWarnEnabled();
+
+  /**
+   * Check whether this Logger is enabled for the WARN Level.
+   *
+   * @param marker The marker data specific to this log statement.
+   * @return boolean - <code>true</code> if this Logger is enabled for level
+   *         WARN, <code>false</code> otherwise.
+   */
+  boolean isWarnEnabled(Marker marker);
+
+  /**
+   * Log a message with the specific Marker at the WARN level.
+   *
+   * @param msg the message string to be logged
+   */
+  void warn(Message msg);
+
+  /**
+   * Log a message with the specific Marker at the WARN level.
+   *
+   * @param msg the message string to be logged
+   * @param t   A Throwable or null.
+   */
+  void warn(Message msg, Throwable t);
+
+  /**
+   * Log a message with the specific Marker at the WARN level.
+   *
+   * @param marker the marker data specific to this log statement
+   * @param msg    the message string to be logged
+   */
+  void warn(Marker marker, Message msg);
+
+  /**
+   * Log a message with the specific Marker at the WARN level.
+   *
+   * @param marker the marker data specific to this log statement
+   * @param msg    the message string to be logged
+   * @param t      A Throwable or null.
+   */
+  void warn(Marker marker, Message msg, Throwable t);
+
+  /**
+   * Log a message object with the {@link org.apache.logging.log4j.Level#ERROR ERROR} level.
+   *
+   * @param message the message object to log.
+   */
+  void error(String message);
+
+  /**
+   * Log a message at the <code>ERROR</code> level including the
+   * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
+   *
+   * @param message the message object to log.
+   * @param t       the exception to log, including its stack trace.
+   */
+  void error(String message, Throwable t);
+
+  /**
+   * Log a message object with the {@link org.apache.logging.log4j.Level#ERROR ERROR} level.
+   *
+   * @param message the message object to log.
+   */
+  void error(Object message);
+
+  /**
+   * Log a message at the <code>ERROR</code> level including the
+   * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
+   *
+   * @param message the message object to log.
+   * @param t       the exception to log, including its stack trace.
+   */
+  void error(Object message, Throwable t);
+
+  /**
+   * Log a message with parameters at the <code>ERROR</code> level.
+   * @param message the message to log.
+   * @param params parameters to the message.
+   */
+  void error(String message, Object... params);
+
+  /**
+   * Check whether this Logger is enabled for the ERROR Level.
+   *
+   * @return boolean - <code>true</code> if this Logger is enabled for level
+   *         ERROR, <code>false</code> otherwise.
+   */
+  boolean isErrorEnabled();
+
+  /**
+   * Check whether this Logger is enabled for the ERROR Level.
+   *
+   * @param marker The marker data specific to this log statement.
+   * @return boolean - <code>true</code> if this Logger is enabled for level
+   *         ERROR, <code>false</code> otherwise.
+   */
+  boolean isErrorEnabled(Marker marker);
+
+  /**
+   * Log a message with the specific Marker at the ERROR level.
+   *
+   * @param msg the message string to be logged
+   */
+  void error(Message msg);
+
+  /**
+   * Log a message with the specific Marker at the ERROR level.
+   *
+   * @param msg the message string to be logged
+   * @param t   A Throwable or null.
+   */
+  void error(Message msg, Throwable t);
+
+  /**
+   * Log a message with the specific Marker at the ERROR level.
+   *
+   * @param marker the marker data specific to this log statement
+   * @param msg    the message string to be logged
+   */
+  void error(Marker marker, Message msg);
+
+  /**
+   * Log a message with the specific Marker at the ERROR level.
+   *
+   * @param marker the marker data specific to this log statement
+   * @param msg    the message string to be logged
+   * @param t      A Throwable or null.
+   */
+  void error(Marker marker, Message msg, Throwable t);
+
+  /**
+   * Log a message object with the {@link org.apache.logging.log4j.Level#FATAL FATAL} level.
+   *
+   * @param message the message object to log.
+   */
+  void fatal(String message);
+
+  /**
+   * Log a message at the <code>FATAL</code> level including the
+   * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
+   *
+   * @param message the message object to log.
+   * @param t       the exception to log, including its stack trace.
+   */
+  void fatal(String message, Throwable t);
+
+    /**
+   * Log a message object with the {@link org.apache.logging.log4j.Level#FATAL FATAL} level.
+   *
+   * @param message the message object to log.
+   */
+  void fatal(Object message);
+
+  /**
+   * Log a message at the <code>FATAL</code> level including the
+   * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
+   *
+   * @param message the message object to log.
+   * @param t       the exception to log, including its stack trace.
+   */
+  void fatal(Object message, Throwable t);
+  /**
+   * Log a message with parameters at the <code>FATAL</code> level.
+   * @param message the message to log.
+   * @param params parameters to the message.
+   */
+  void fatal(String message, Object... params);
+
+  /**
+   * Check whether this Logger is enabled for the FATAL Level.
+   *
+   * @return boolean - <code>true</code> if this Logger is enabled for level
+   *         FATAL, <code>false</code> otherwise.
+   */
+  boolean isFatalEnabled();
+
+  /**
+   * Check whether this Logger is enabled for the FATAL Level.
+   *
+   * @param marker The marker data specific to this log statement.
+   * @return boolean - <code>true</code> if this Logger is enabled for level
+   *         FATAL, <code>false</code> otherwise.
+   */
+  boolean isFatalEnabled(Marker marker);
+
+  /**
+   * Log a message with the specific Marker at the FATAL level.
+   *
+   * @param msg the message string to be logged
+   */
+  void fatal(Message msg);
+
+  /**
+   * Log a message with the specific Marker at the FATAL level.
+   *
+   * @param msg the message string to be logged
+   * @param t   A Throwable or null.
+   */
+  void fatal(Message msg, Throwable t);
+
+  /**
+   * Log a message with the specific Marker at the FATAL level.
+   *
+   * @param marker the marker data specific to this log statement
+   * @param msg    the message string to be logged
+   */
+  void fatal(Marker marker, Message msg);
+
+  /**
+   * Log a message with the specific Marker at the FATAL level.
+   *
+   * @param marker the marker data specific to this log statement
+   * @param msg    the message string to be logged
+   * @param t      A Throwable or null.
+   */
+  void fatal(Marker marker, Message msg, Throwable t);
+}

Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/MDC.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/MDC.java?rev=943816&view=auto
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/MDC.java (added)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/MDC.java Thu May 13 06:31:04 2010
@@ -0,0 +1,113 @@
+/*
+ * 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;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * The MDC class is similar to the {@link NDC} class except that it is
+ * based on a map instead of a stack. It provides <em>mapped
+ * diagnostic contexts</em>. A <em>Mapped Diagnostic Context</em>, or
+ * MDC in short, is an instrument for distinguishing interleaved log
+ * output from different sources. Log output is typically interleaved
+ * when a server handles multiple clients near-simultaneously.
+ * <p/>
+ * <p><b><em>The MDC is managed on a per thread basis</em></b>. A
+ * child thread automatically inherits a <em>copy</em> of the mapped
+ * diagnostic context of its parent.
+ */
+public final class MDC {
+
+    private static ThreadLocal<Map<String, Object>> LOCAL =
+        new InheritableThreadLocal<Map<String, Object>>() {
+            protected Map<String, Object> initialValue() {
+                return new HashMap<String, Object>();
+            }
+
+            protected Map<String, Object> childValue(Map<String, Object> parentValue) {
+                return parentValue == null ? null : new HashMap<String, Object>(parentValue);
+            }
+        };
+
+
+    private MDC() {
+
+    }
+
+    /**
+     * Put a context value (the <code>o</code> parameter) as identified
+     * with the <code>key</code> parameter into the current thread's
+     * context map.
+     * <p/>
+     * <p>If the current thread does not have a context map it is
+     * created as a side effect.
+     * @param key The key name.
+     * @param value The key value.
+     */
+    public static void put(String key, Object value) {
+        LOCAL.get().put(key, value);
+    }
+
+    /**
+     * Get the context identified by the <code>key</code> parameter.
+     * <p/>
+     * <p>This method has no side effects.
+     * @param key The key to locate.
+     * @return The value of the object or null.
+     */
+    public static Object get(String key) {
+        return LOCAL.get().get(key);
+    }
+
+    /**
+     * Remove the the context identified by the <code>key</code>
+     * parameter.
+     * @param key The key to remove.
+     */
+    public static void remove(String key) {
+        LOCAL.get().remove(key);
+    }
+
+    /**
+     * Clear the context.
+     */
+    public static void clear() {
+        LOCAL.get().clear();
+    }
+
+    /**
+     * Determine if the key is in the context.
+     * @param key The key to locate.
+     * @return True if the key is in the context, false otherwise.
+     */
+    public static boolean containsKey(String key) {
+        return LOCAL.get().containsKey(key);
+    }
+
+    /**
+     * Get the current thread's MDC as a hashtable. This method is
+     * intended to be used internally.
+     * @return a copy of the context.
+     */
+    public static Map<String, Object> getContext() {
+        return new HashMap<String, Object>(LOCAL.get());
+    }
+
+}

Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Marker.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Marker.java?rev=943816&view=auto
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Marker.java (added)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Marker.java Thu May 13 06:31:04 2010
@@ -0,0 +1,66 @@
+/*
+ * 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;
+
+import java.io.Serializable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ *
+ */
+public class Marker implements Serializable {
+
+  private static ConcurrentMap<String, Marker> markerMap = new ConcurrentHashMap<String, Marker>();
+
+  public static Marker getMarker(String name) {
+    return markerMap.putIfAbsent(name, new Marker(name));
+  }
+
+  public static Marker getMarker(String name, String parent) {
+    Marker parentMarker = markerMap.get(parent);
+    if (parentMarker == null) {
+      throw new IllegalArgumentException("Parent Marker " + parent + " has not been defined");
+    }
+    return getMarker(name, parentMarker);
+  }
+
+  public static Marker getMarker(String name, Marker parent) {
+    return markerMap.putIfAbsent(name, new Marker(name, parent));
+  }
+
+  private String name;
+  private Marker parent;
+
+  private Marker(String name) {
+    this.name = name;
+  }
+
+  private Marker(String name, Marker parent) {
+    this.name = name;
+    this.parent = parent;
+  }
+
+  public String getName() {
+    return this.name;
+  }
+
+  public Marker getParent() {
+    return this.parent;
+  }
+
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...

Posted by Curt Arnold <ca...@apache.org>.
On May 14, 2010, at 8:41 PM, Ralph Goers wrote:

> See below. 
> 
> On May 14, 2010, at 7:07 AM, Curt Arnold wrote:
> 
>> Could you review the "bugs" in the log4j2 JIRA and give a quick comments about your submission and the bug.
> 
> Sure. I'll try to do this asap but my time to work on Log4j isn't very consistent.

Same here.


> 
>> 
>> If there are any significant design decisions or requirements that came out from this work, could you file them as new bugs.
> 
> Be happy to.
>> 
>> Did you use or consider the earlier pattern layout stuff I did in the sandbox?
> 
> As I mentioned in my earlier email, I used the EnhancedPatternLayout that is in the experimental branch as a starting point. I changed the name back to PatternLayout and made that a plugin and made all the converters plugins. I also modified a couple of the converters where it was neeed. 
> 

I didn't recall naming it EnhancedPatternLayout, been a long time since I looked at it.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...

Posted by Ralph Goers <ra...@dslextreme.com>.
See below. 

On May 14, 2010, at 7:07 AM, Curt Arnold wrote:

> Could you review the "bugs" in the log4j2 JIRA and give a quick comments about your submission and the bug.

Sure. I'll try to do this asap but my time to work on Log4j isn't very consistent.

> 
> If there are any significant design decisions or requirements that came out from this work, could you file them as new bugs.

Be happy to.
> 
> Did you use or consider the earlier pattern layout stuff I did in the sandbox?

As I mentioned in my earlier email, I used the EnhancedPatternLayout that is in the experimental branch as a starting point. I changed the name back to PatternLayout and made that a plugin and made all the converters plugins. I also modified a couple of the converters where it was neeed. 

> 
> Do you have or want to suggest a code name for this submission?  I wanted to avoid ever calling my earlier stuff "log4j2" while it was still highly experimental.

I'm not sure why that is a problem. It isn't like anyone is going to confuse this for a releasable code base being in a branch named "EXPERIMENTAL" and in a subdirectory named ralph. If it does get pulled up to a real dev branch then we won't have to go through the busy work of package renaming.  Referencing it in emails as "Ralph's Log4j2" vs "Curt's Log4j2" should be enough to avoid any confusion. And hopefully, the experimentation phase won't last too long before creating a common code base (although I'd still expect people to fork that while they try new things - this is one of the areas where using github would really help).

Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...

Posted by Curt Arnold <ca...@apache.org>.
Could you review the "bugs" in the log4j2 JIRA and give a quick comments about your submission and the bug.

If there are any significant design decisions or requirements that came out from this work, could you file them as new bugs.

Did you use or consider the earlier pattern layout stuff I did in the sandbox?

Do you have or want to suggest a code name for this submission?  I wanted to avoid ever calling my earlier stuff "log4j2" while it was still highly experimental.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...

Posted by Ralph Goers <ra...@dslextreme.com>.
On May 14, 2010, at 2:01 AM, Thorbjørn Ravn Andersen wrote:

> Den 14/05/10 09.22, Ralph Goers skrev:
>> 2. I don't like the way Logback binds to the implementation. I used a technique I had used in a previous logging framework and used a file to define the implementation class. In theory, the API could be modified to support multiple logging implementation simultaneously, although I have no plans to implement that.
>>   
> You mean slf4j binding to logback?

Technically, SLF4J binding to any implementation. But yes, Logback is usually the implementaion.

Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...

Posted by Thorbjørn Ravn Andersen <no...@gmail.com>.
Den 14/05/10 09.22, Ralph Goers skrev:
> 2. I don't like the way Logback binds to the implementation. I used a technique I had used in a previous logging framework and used a file to define the implementation class. In theory, the API could be modified to support multiple logging implementation simultaneously, although I have no plans to implement that.
>    
You mean slf4j binding to logback?

I think the work done with standardizing the Seam approach in JEE 6 
(which I am reading up on) will benefit also slf4j, since it will 
basically handle the API->implementation binding, so that the logging 
framework will not have to.

> 7, All internal components use the logger API for status reporting. A specific StatusLogger provides the implementation.
>    
I like that.  It is nice that you can use logging even if you are coding 
stuff inside a logger.

-- 
   Thorbjørn Ravn Andersen  "...plus... Tubular Bells!"


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: A new thread for log4j 2.0 discussion (Was Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...)

Posted by Ralph Goers <ra...@dslextreme.com>.
On May 23, 2010, at 9:30 PM, Curt Arnold wrote:

> 
>> 
>>> 
>>> The AsynchronousAppender in log4j requires trying to freeze LoggingEvent which is still subject to message objects changing underneath it.  Also it generally perform unnecessary actions in freezing everything in the LoggingEvent even though much of it will not be used.
>>> 
>>> The framework should be designed to separate the parts required to be synchronous (that is anything dealing with external objects) from the parts that can be deferred. 
>> 
>> I don't think I really agree with this, at least the way you are expressing it. Typically, the "parts required to be synchronous" are also the ones that are expensive to resolve. What you are suggesting is that somehow it is easier to deal with a LogEvent that has a reference to another object that contains the references to the "synchronous objects" than to just copy the whole LogEvent. But copying simple object references like Strings doesn't cost all that much and may not even be worth doing if the appender needs some sort of serialized version of the LogEvent instead (SyslogAppender using either the serialized logging event or the IETFSyslogLayout that I haven't added yet).
> 
> The summary in the second sentence feels the antithesis of what I'm suggesting.
> 
> Copying the "whole log event" so that the copy is not affected by any potential changes is complicated, expensive and error-prone as seen in log4j's AsyncAppender.  The message parameter or any value in the MDC or NDC in the log4j API can be any arbitrary object.  If it is immutable, then you are fine.  If not and the object is serializable or clonable, you could clonable.  Otherwise, you are subject to changes that could occur after the logging call.
> 
> Restricting message, MDC and NDC parameters to strings is not desirable.  log4j allows it and there are reasonable and worthwhile reasons to use them. 

You are correct. I had forgotten MDC and NDC allow Objects. I've gotten used to SLF4J only allowing Strings on the MDC. But the MDC I checked in does support Objects. I will have to look at what is happening with that in the LogEvent again.

> 
> AsyncAppender does a not totally satisfactory clone of a LoggingEvent and then runs the nested appender later on that clone, none of the nested appenders code runs during the synchronous phase.  The alternative I'm suggesting is to allow appenders to see the LoggingEvent in the extraction phase, get all the information that it needs (or possibly do the whole action) and then leave a Runnable to complete the action.  If fully synchronous, the runnable would be immediately executed, if not, then sent to a queue for later execution.

Using a thread for to perform a synchronous activity is not something I think I'd be in favor of. Creating a thread is not trivial. Creating thread pools causes problems that have to be dealt with in servlet containers. Ceki and I had a discussion about that with a bug in Logback and I tended to agree with his position that creating long lived threads is bad.

> 
> 
> 
>> 
>> In looking at Log4jLogEvent really the only fields that deal with external objects are the Message and the Throwable.  I suppose a Throwable could be a problem if the caller has created their own exception type and added odd stuff to it (complex object references), although I can't say I've ever run across an Exception that does that.  The Message can be solved by a) doing new SimpleMessage(message.getFormattedMessage()), b) serializing the message and deserializing it, or c) adding another method to the Message interface like "prepareForAsynch". 
> 
> "prepareForAsynch" has the same problem as serializing the logging event.  There is no bulletproof way to make an invariant copy of every arbitrary objects and some may be extraordinary expensive.  It seems to me to be much clearer to have a phase where you have access to the LoggingEvent interface in the scope of the logging call, but anything deferred must act on what was extracted from that call.  At the simplest, it could be to run the layout in the extraction phase and hold the string for the completion phase.

You are going to have to show me some code as I really don't see the difference between "prepareForAsynch" and a "phase".

> 
> If I have an "itch" for log4j 2.0, this is it.  I'm not sure where the path would lead, but it is the path that I want to explore.

I'm certainly not going to get in the way.  The whole point of putting something out there is to have a place to start from.

Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: A new thread for log4j 2.0 discussion (Was Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...)

Posted by Curt Arnold <ca...@apache.org>.
On May 23, 2010, at 2:27 AM, Ralph Goers wrote:

> 
> On May 22, 2010, at 8:13 PM, Curt Arnold wrote:
> 
>> 
>> On May 22, 2010, at 10:50 AM, Ralph Goers wrote:
>>> 
>>>> 
>>>> Also, I have had an issue where the I wanted the toString() method on the object to be logged to be delayed as much as possible (somewhat helped with the {}-construct in slf4j).  This might be doable with a specific log interface.
>>> 
>>> That is exactly what Message does.
>>> 
>> 
>> 
>> My thoughts, but not sure how much of this got into my earlier code, was to have a distinct extraction phase that occur synchronously with the logging call that would extract all info needed for a completion phase that could occur either immediately or be deferred.  The extraction phase would need to extract any info from the call into immutable objects so state change, for example mutable message parameters, before the completion stage would not change the resulting log.
> 
> There is no point in doing this in simple use cases such as using the FileAppender to write to a log file.

Usually not the simple cases that dictate the design.

> 
>> 
>> A example where this would be useful is logging floating point numbers.  It can be surprisingly expensive to format floating point numbers, so it is highly beneficial to extract all the pieces needed for the formatting into an immutable package during the synchronous extraction phase and then do the formatting in the asynchronous completion phase.
> 
> This assumes there is an asynchronous phase. In my audit logging use cases I do not want asynchronous logging because I want any exceptions that occur to be thrown back to the caller.  An awful lot of logs just write Strings and simple values. While we should support use cases like what you are suggesting I think it would be unwise to optimize for them at the expense of typical usage.

If the framework allows for clear separation between required to be synchronous and allowed to be asynchronous, then doing everything synchronous is easy as immediately invoking run() on the returned Runnable.  Might come with a performance cost when running purely synchronous, but without some experimentation can't quantity if it is significant.

> 
>> 
>> The AsynchronousAppender in log4j requires trying to freeze LoggingEvent which is still subject to message objects changing underneath it.  Also it generally perform unnecessary actions in freezing everything in the LoggingEvent even though much of it will not be used.
>> 
>> The framework should be designed to separate the parts required to be synchronous (that is anything dealing with external objects) from the parts that can be deferred. 
> 
> I don't think I really agree with this, at least the way you are expressing it. Typically, the "parts required to be synchronous" are also the ones that are expensive to resolve. What you are suggesting is that somehow it is easier to deal with a LogEvent that has a reference to another object that contains the references to the "synchronous objects" than to just copy the whole LogEvent. But copying simple object references like Strings doesn't cost all that much and may not even be worth doing if the appender needs some sort of serialized version of the LogEvent instead (SyslogAppender using either the serialized logging event or the IETFSyslogLayout that I haven't added yet).

The summary in the second sentence feels the antithesis of what I'm suggesting.

Copying the "whole log event" so that the copy is not affected by any potential changes is complicated, expensive and error-prone as seen in log4j's AsyncAppender.  The message parameter or any value in the MDC or NDC in the log4j API can be any arbitrary object.  If it is immutable, then you are fine.  If not and the object is serializable or clonable, you could clonable.  Otherwise, you are subject to changes that could occur after the logging call.

Restricting message, MDC and NDC parameters to strings is not desirable.  log4j allows it and there are reasonable and worthwhile reasons to use them. 

AsyncAppender does a not totally satisfactory clone of a LoggingEvent and then runs the nested appender later on that clone, none of the nested appenders code runs during the synchronous phase.  The alternative I'm suggesting is to allow appenders to see the LoggingEvent in the extraction phase, get all the information that it needs (or possibly do the whole action) and then leave a Runnable to complete the action.  If fully synchronous, the runnable would be immediately executed, if not, then sent to a queue for later execution.



> 
> In looking at Log4jLogEvent really the only fields that deal with external objects are the Message and the Throwable.  I suppose a Throwable could be a problem if the caller has created their own exception type and added odd stuff to it (complex object references), although I can't say I've ever run across an Exception that does that.  The Message can be solved by a) doing new SimpleMessage(message.getFormattedMessage()), b) serializing the message and deserializing it, or c) adding another method to the Message interface like "prepareForAsynch". 

"prepareForAsynch" has the same problem as serializing the logging event.  There is no bulletproof way to make an invariant copy of every arbitrary objects and some may be extraordinary expensive.  It seems to me to be much clearer to have a phase where you have access to the LoggingEvent interface in the scope of the logging call, but anything deferred must act on what was extracted from that call.  At the simplest, it could be to run the layout in the extraction phase and hold the string for the completion phase.

If I have an "itch" for log4j 2.0, this is it.  I'm not sure where the path would lead, but it is the path that I want to explore.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: A new thread for log4j 2.0 discussion (Was Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...)

Posted by Ralph Goers <ra...@dslextreme.com>.
On May 22, 2010, at 8:13 PM, Curt Arnold wrote:

> 
> On May 22, 2010, at 10:50 AM, Ralph Goers wrote:
>> 
>>> 
>>> Also, I have had an issue where the I wanted the toString() method on the object to be logged to be delayed as much as possible (somewhat helped with the {}-construct in slf4j).  This might be doable with a specific log interface.
>> 
>> That is exactly what Message does.
>> 
> 
> 
> My thoughts, but not sure how much of this got into my earlier code, was to have a distinct extraction phase that occur synchronously with the logging call that would extract all info needed for a completion phase that could occur either immediately or be deferred.  The extraction phase would need to extract any info from the call into immutable objects so state change, for example mutable message parameters, before the completion stage would not change the resulting log.

There is no point in doing this in simple use cases such as using the FileAppender to write to a log file.

> 
> A example where this would be useful is logging floating point numbers.  It can be surprisingly expensive to format floating point numbers, so it is highly beneficial to extract all the pieces needed for the formatting into an immutable package during the synchronous extraction phase and then do the formatting in the asynchronous completion phase.

This assumes there is an asynchronous phase. In my audit logging use cases I do not want asynchronous logging because I want any exceptions that occur to be thrown back to the caller.  An awful lot of logs just write Strings and simple values. While we should support use cases like what you are suggesting I think it would be unwise to optimize for them at the expense of typical usage.

> 
> The AsynchronousAppender in log4j requires trying to freeze LoggingEvent which is still subject to message objects changing underneath it.  Also it generally perform unnecessary actions in freezing everything in the LoggingEvent even though much of it will not be used.
> 
> The framework should be designed to separate the parts required to be synchronous (that is anything dealing with external objects) from the parts that can be deferred. 

I don't think I really agree with this, at least the way you are expressing it. Typically, the "parts required to be synchronous" are also the ones that are expensive to resolve. What you are suggesting is that somehow it is easier to deal with a LogEvent that has a reference to another object that contains the references to the "synchronous objects" than to just copy the whole LogEvent. But copying simple object references like Strings doesn't cost all that much and may not even be worth doing if the appender needs some sort of serialized version of the LogEvent instead (SyslogAppender using either the serialized logging event or the IETFSyslogLayout that I haven't added yet).

In looking at Log4jLogEvent really the only fields that deal with external objects are the Message and the Throwable.  I suppose a Throwable could be a problem if the caller has created their own exception type and added odd stuff to it (complex object references), although I can't say I've ever run across an Exception that does that.  The Message can be solved by a) doing new SimpleMessage(message.getFormattedMessage()), b) serializing the message and deserializing it, or c) adding another method to the Message interface like "prepareForAsynch". 



Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: A new thread for log4j 2.0 discussion (Was Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...)

Posted by Curt Arnold <ca...@apache.org>.
On May 22, 2010, at 10:50 AM, Ralph Goers wrote:
> 
>> 
>> Also, I have had an issue where the I wanted the toString() method on the object to be logged to be delayed as much as possible (somewhat helped with the {}-construct in slf4j).  This might be doable with a specific log interface.
> 
> That is exactly what Message does.
> 


My thoughts, but not sure how much of this got into my earlier code, was to have a distinct extraction phase that occur synchronously with the logging call that would extract all info needed for a completion phase that could occur either immediately or be deferred.  The extraction phase would need to extract any info from the call into immutable objects so state change, for example mutable message parameters, before the completion stage would not change the resulting log.

A example where this would be useful is logging floating point numbers.  It can be surprisingly expensive to format floating point numbers, so it is highly beneficial to extract all the pieces needed for the formatting into an immutable package during the synchronous extraction phase and then do the formatting in the asynchronous completion phase.

The AsynchronousAppender in log4j requires trying to freeze LoggingEvent which is still subject to message objects changing underneath it.  Also it generally perform unnecessary actions in freezing everything in the LoggingEvent even though much of it will not be used.

The framework should be designed to separate the parts required to be synchronous (that is anything dealing with external objects) from the parts that can be deferred. 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: A new thread for log4j 2.0 discussion (Was Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...)

Posted by Ralph Goers <ra...@dslextreme.com>.
On May 22, 2010, at 12:46 AM, Thorbjørn Ravn Andersen wrote:

> Den 22/05/10 04.44, Curt Arnold skrev:
>> 
>>> 1. I first created an API that had the features I was looking for. That is in log4j2-api. While it supports logging a String or an Object it really uses a Message interface which is valuable as it allows users to log self-describing objects in a convenient manner.
>>>     
>> My thinking was the message interface would end up so minimal that might as well just use Object.
>>   
> Would it be feasible to use Object so any object can be logged, but support one or more interfaces that allow a given object to provide more information to the logger framework?

Take a look at the API. Specifically, Logger and AbstractLogger.  debug(Object) is supported. Under the covers it turns into log(new ObjectMessage(object)). The advantage is if the Object implements the Message interface then the call is debug(Message) and the Object is thus self describing. Alternatively, the user could associate their object's with Message objects (i.e. debug(object.getMessage()). For example, if the Object contains data that shouldn't be logged (like a Social Security Number, PIN, etc.) this allows the Object the flexibility to control that.

> 
> Also, I have had an issue where the I wanted the toString() method on the object to be logged to be delayed as much as possible (somewhat helped with the {}-construct in slf4j).  This might be doable with a specific log interface.

That is exactly what Message does.

Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: A new thread for log4j 2.0 discussion (Was Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...)

Posted by Thorbjørn Ravn Andersen <no...@gmail.com>.
Den 22/05/10 04.44, Curt Arnold skrev:
>
>> 1. I first created an API that had the features I was looking for. That is in log4j2-api. While it supports logging a String or an Object it really uses a Message interface which is valuable as it allows users to log self-describing objects in a convenient manner.
>>      
> My thinking was the message interface would end up so minimal that might as well just use Object.
>    
Would it be feasible to use Object so any object can be logged, but 
support one or more interfaces that allow a given object to provide more 
information to the logger framework?

Also, I have had an issue where the I wanted the toString() method on 
the object to be logged to be delayed as much as possible (somewhat 
helped with the {}-construct in slf4j).  This might be doable with a 
specific log interface.

-- 
   Thorbjørn Ravn Andersen  "...plus... Tubular Bells!"


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: A new thread for log4j 2.0 discussion (Was Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...)

Posted by Curt Arnold <ca...@apache.org>.
On May 21, 2010, at 11:15 PM, Ralph Goers wrote:
>> 
>>> 1. I first created an API that had the features I was looking for. That is in log4j2-api. While it supports logging a String or an Object it really uses a Message interface which is valuable as it allows users to log self-describing objects in a convenient manner.
>> 
>> My thinking was the message interface would end up so minimal that might as well just use Object.
> 
> I don't think so. For example, take a look at StructuredDataMessage and LocalizedMessage. Those allow you to do some interesting things. The idea is that it is easy for users to extend without having to muck with the internals. Ceki handled this by creating logback-classis, logback-access and logback-audit. That seemed to me to be a very heavyweight approach to accomplish this.

Definitely will look at, just wanted to let you know my unchallenged inclination.  I'm willing to be convinced.

A little off track, there was a long ago thread that wandered between log4j and commons logging about localization of logging that came to mind.  Took me a while to find it, but the threads of interest are:

http://article.gmane.org/gmane.comp.jakarta.commons.devel/59103/match=arnold+enterprise
http://www.mail-archive.com/log4j-user@logging.apache.org/msg00479.html


> 
>> 
>> 
>>> 2. I don't like the way Logback binds to the implementation. I used a technique I had used in a previous logging framework and used a file to define the implementation class. In theory, the API could be modified to support multiple logging implementation simultaneously, although I have no plans to implement that.
>> 
>> Not something that I've thought about.
> 
> Probably not. It just occurred to me that it is possible as I was implementing it but decided it wasn't an itch I needed to scratch at the moment.
> 
>> 
>> 
>>> 3. Logback suffers from a serious architectural problem that is rooted in Log4j. The configured loggers are mixed with the loggers returned from the Logger factory. This makes it impossible to reconfigure atomically. With Logback the reset method is called on the context which essentially causes the system to be in an undefined state until the new configuration is completed (log records that should be logged are lost). To solve this I used a design that I again borrowed from my previous framework. The configuration is separated and on a reconfiguration the new configuration will be created and then all the loggers will be updated to use it. While there will be a period where some loggers are using the old configuration and some the new there is never a point where loggers aren't configured at all.
>> 
>> I think that is along the line that I was thinking, basically there is an immutable configuration state object that is swapped out as an atomic operation with notification to allocated loggers.
> 
> Exactly.
> 
>> 
>> 
>>> 4. Similar to Logback I added support for Markers and global filters. In addition, filters on Loggers are also supported. Unlike Logback, there is only a single Filter interface used for global filters, logger filters and appender filters.
>> 
>> I've never had a clear description of the use cases behind Markers.  As far as I can gather, it is a specialized case of a user supplied context.  At the core, I think it would fit into a general user-supplied context object.  MDC and NDC would be part of the thread-supplied context and there'd be a global context and a call-site context.  In the core, I'd expect the context parameters to just be Object and let the layout level cast to specific known interfaces as needed.  During the synchronous extraction phase, an immutable package would be assembled for from log request parameters and the contexts based on the needs of the layout's formatting phase.
> 
> I think I'd need to see code to get what you are driving at.  In the code I checked in it does have the MDC & NDC and does have a global context, although I haven't added variables to it yet. It also has the configuration which can also have variables, but probably for a different purpose. I don't know what you mean by "call-site context".  

I was meaning the context that is only valid for the duration of the call, essentially the info that you'd get from new Throwable().getStackTrace().

> 
> The value of Markers is that they are fast and easy to filter on. I use them for Entry and Exit so that you can easily filter them out (admittedly this can also be done via the TRACE level) as well as catching and throwing. In addition, I also use a Marker to identify audit events. Anything with that Marker will always be logged.
> 

Still seems like a specialized user context object to me.  Don't know if there is a user-supplied context object outside of it.  Will need to take a look.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: A new thread for log4j 2.0 discussion (Was Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...)

Posted by Ralph Goers <ra...@dslextreme.com>.
On May 21, 2010, at 7:44 PM, Curt Arnold wrote:

> Thought it might be best to leave the old thread behind, hope nobody minds.
> 
> 
> On May 14, 2010, at 2:22 AM, Ralph Goers wrote:
> 
>> Thanks for trying it out. I hadn't actually built from the root - I've built the api and core separately - so I'm glad you were able to fix those problems.
>> 
>> I didn't want to commit code until I had the core of something that actually functioned. I struggled for a couple of weeks over how to attack XMLConfiguration. I don't like the way Logback does it, I didn't want to bring in baggage from a third party framework, JAXB isn't a good fit either. In short, I wanted something that can be extended without needing to add "rules" to the XML processor. See below for what I came up with.
>> 
> 
> I understand the desire to have something fleshed out enough so your thoughts have concrete expression.  Easier to point to code than to try to express in verbiage your thoughts on how everything is going to come together, but there are downsides and can be abused. 

Actually, I had no idea how it would come together. I just had some vague idea of what I wanted to do and watched what popped out. 

> 
> 
>> First, while I looked at Log4j and somewhat at Logback, most of the core code is completely new. The exception to this is with the Converters for the PatternLayout. I took the EnhancedPatternLayout and modified it.
>> 
> 
> 
> I had totally forgotten that I called that EnhancedPatternLayout, so I wasn't sure if you were talking about the extras version or the sandbox version.
> 
> 
>> 1. I first created an API that had the features I was looking for. That is in log4j2-api. While it supports logging a String or an Object it really uses a Message interface which is valuable as it allows users to log self-describing objects in a convenient manner.
> 
> My thinking was the message interface would end up so minimal that might as well just use Object.

I don't think so. For example, take a look at StructuredDataMessage and LocalizedMessage. Those allow you to do some interesting things. The idea is that it is easy for users to extend without having to muck with the internals. Ceki handled this by creating logback-classis, logback-access and logback-audit. That seemed to me to be a very heavyweight approach to accomplish this.

> 
> 
>> 2. I don't like the way Logback binds to the implementation. I used a technique I had used in a previous logging framework and used a file to define the implementation class. In theory, the API could be modified to support multiple logging implementation simultaneously, although I have no plans to implement that.
> 
> Not something that I've thought about.

Probably not. It just occurred to me that it is possible as I was implementing it but decided it wasn't an itch I needed to scratch at the moment.

> 
> 
>> 3. Logback suffers from a serious architectural problem that is rooted in Log4j. The configured loggers are mixed with the loggers returned from the Logger factory. This makes it impossible to reconfigure atomically. With Logback the reset method is called on the context which essentially causes the system to be in an undefined state until the new configuration is completed (log records that should be logged are lost). To solve this I used a design that I again borrowed from my previous framework. The configuration is separated and on a reconfiguration the new configuration will be created and then all the loggers will be updated to use it. While there will be a period where some loggers are using the old configuration and some the new there is never a point where loggers aren't configured at all.
> 
> I think that is along the line that I was thinking, basically there is an immutable configuration state object that is swapped out as an atomic operation with notification to allocated loggers.

Exactly.

> 
> 
>> 4. Similar to Logback I added support for Markers and global filters. In addition, filters on Loggers are also supported. Unlike Logback, there is only a single Filter interface used for global filters, logger filters and appender filters.
> 
> I've never had a clear description of the use cases behind Markers.  As far as I can gather, it is a specialized case of a user supplied context.  At the core, I think it would fit into a general user-supplied context object.  MDC and NDC would be part of the thread-supplied context and there'd be a global context and a call-site context.  In the core, I'd expect the context parameters to just be Object and let the layout level cast to specific known interfaces as needed.  During the synchronous extraction phase, an immutable package would be assembled for from log request parameters and the contexts based on the needs of the layout's formatting phase.

I think I'd need to see code to get what you are driving at.  In the code I checked in it does have the MDC & NDC and does have a global context, although I haven't added variables to it yet. It also has the configuration which can also have variables, but probably for a different purpose. I don't know what you mean by "call-site context".  

The value of Markers is that they are fast and easy to filter on. I use them for Entry and Exit so that you can easily filter them out (admittedly this can also be done via the TRACE level) as well as catching and throwing. In addition, I also use a Marker to identify audit events. Anything with that Marker will always be logged.


> 
> 
>> 5. The XMLConfiguration is extremely simple. All it does is read the XML and convert the DOM structure to internal Node elements, which contain the node attributes, child node references and placeholders for the real object when it is constructed. It uses the XML element name to match to a Plugin, so instead of writing:
>> 
>> <appender name="console" class="org.apache.log4j.ConsoleAppender">
>> <param name="Target" value="System.out"/>
>> <layout class="org.apache.log4j.PatternLayout">
>>    <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
>> </layout>
>> </appender>
>> 
>> you write:
>> 
>> <appenders>
>>  <Console name="console" target="SYSTEM_OUT">
>>    <PatternLayout>%-5p %c{1} - %m%n</PatternLayout>
>>  </Console>
>> </appenders>
>> 
>> Note that it also would support
>>  <Console>
>>     <name>console</name>
>>     <target>SYSTEM_OUT</target>
>>    <PatternLayout>%-5p %c{1} - %m%n</PatternLayout>
>>  </Console>
>> 
>> if you prefer using elements over attributes.
> 
> It is something necessary, but hopefully configuration ends up something outside the core using public methods to do its magic.

The API doesn't have any visibility to the configuration. In this implementation BaseConfiguration really does all the work. Any number of implementations could extend it to support various ways of expressing the configuration.

> 
>> 
>> 5. I implemented a "Plugin" concept. All core components use annotations to describe their name and type. This is used by the XML configuration to determine the element names that are used in the configuration file. 
>> a) Plugins are used for Logger, Appenders, Filters, etc. The BaseConfiguration processes the nodes created by XMLConfiguration and saves the resulting Objects as appropriate.
>> b) PatternLayout uses plugins for the converters. To add a new converter an end user just needs to create the class with the correct annotation and add the package name to the XML configuration as an attribute.
>> c) Configuration uses plugins to determine the Configuration implementation to use. The XMLConfiguration and DefaultConfiguration will always be present, but a weight can be specified to allow the new Configuration to take precedence. Again, simply placing the Configuration class (with the appropriate annotations) in the classpath will cause it to be used. However, if it is in a different package that package will have to be registered to be searched either by calling a static method on the PluginManager or via a system property (which hasn't been implemented yet).
> 
> Any thoughts on OSGi or other component frameworks?  Not now, maybe, never?

OSGi has to be supported. I would call myself an OSGi novice. Hopefully, this is an area where others with more experience can provide ideas and code.

> 
>> 6. java.util.concurrent is used where appropriate. Accordingly, minimal locking takes place. No lock is held while Appenders are called which is a serious bug in Log4j 1.x as it causes deadlocks.
>> 7, All internal components use the logger API for status reporting. A specific StatusLogger provides the implementation. 
>> 8. Layouts return a byte array. In Logback Ceki recently came up with the idea of using encoders to allow binary data streams to be sent and received. While the requirement seems valid it seemed awkward to wrap a Layout in an encoder.
> 
> I think there will likely need to be separate byte and character Layout-like interfaces.  There are sometimes you are writing to a character-oriented destination like a database API and other times to a byte-oriented destination like a file system or network socket.  You'd like something like PatternLayout to be able to work in both instances (though it would need to be paired with a character encoder for a byte-oriented destination).
> 
> The XMLLayout in log4j 1.2 suffers from this since it really should be byte-oriented.  At the present, invalid XML can be generated if you do not use UTF-8 or UTF-16.
> 
> The Java serialization in the socket appender is effectively a byte-oriented layout and there is no reason you should not be able to connect it to a file appender. 

That is pretty much why I made the Layout return the byte array. Alls the Converters in the PatternLayout manipulate Strings. The resulting String is converted to a byte array at the last moment.

> 
> 
>> 9. Obviously, everything leverages Java 5 (and might possibly require Java 6 since that is the JVM I've been using).
>> 
>> The API is not compatible with log4j 1.x. My intention would be to create a compatible API (to the degree possible) in a log4j12-api package.
>> 
> 
> I believe that we should try to do design the core so it is the best core and then later see what, if any, needs to be tweaked.

I checked in the log4j 1.x API the other day. It isn't completely compatible as the underlying foundation doesn't have a Hierarchy or Repository. And it may not be compatible operationally. But again, it is a place to start.


Ralph



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


A new thread for log4j 2.0 discussion (Was Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...)

Posted by Curt Arnold <ca...@apache.org>.
Thought it might be best to leave the old thread behind, hope nobody minds.


On May 14, 2010, at 2:22 AM, Ralph Goers wrote:

> Thanks for trying it out. I hadn't actually built from the root - I've built the api and core separately - so I'm glad you were able to fix those problems.
> 
> I didn't want to commit code until I had the core of something that actually functioned. I struggled for a couple of weeks over how to attack XMLConfiguration. I don't like the way Logback does it, I didn't want to bring in baggage from a third party framework, JAXB isn't a good fit either. In short, I wanted something that can be extended without needing to add "rules" to the XML processor. See below for what I came up with.
> 

I understand the desire to have something fleshed out enough so your thoughts have concrete expression.  Easier to point to code than to try to express in verbiage your thoughts on how everything is going to come together, but there are downsides and can be abused. 


> First, while I looked at Log4j and somewhat at Logback, most of the core code is completely new. The exception to this is with the Converters for the PatternLayout. I took the EnhancedPatternLayout and modified it.
> 


I had totally forgotten that I called that EnhancedPatternLayout, so I wasn't sure if you were talking about the extras version or the sandbox version.


> 1. I first created an API that had the features I was looking for. That is in log4j2-api. While it supports logging a String or an Object it really uses a Message interface which is valuable as it allows users to log self-describing objects in a convenient manner.

My thinking was the message interface would end up so minimal that might as well just use Object.


> 2. I don't like the way Logback binds to the implementation. I used a technique I had used in a previous logging framework and used a file to define the implementation class. In theory, the API could be modified to support multiple logging implementation simultaneously, although I have no plans to implement that.

Not something that I've thought about.


> 3. Logback suffers from a serious architectural problem that is rooted in Log4j. The configured loggers are mixed with the loggers returned from the Logger factory. This makes it impossible to reconfigure atomically. With Logback the reset method is called on the context which essentially causes the system to be in an undefined state until the new configuration is completed (log records that should be logged are lost). To solve this I used a design that I again borrowed from my previous framework. The configuration is separated and on a reconfiguration the new configuration will be created and then all the loggers will be updated to use it. While there will be a period where some loggers are using the old configuration and some the new there is never a point where loggers aren't configured at all.

I think that is along the line that I was thinking, basically there is an immutable configuration state object that is swapped out as an atomic operation with notification to allocated loggers.


> 4. Similar to Logback I added support for Markers and global filters. In addition, filters on Loggers are also supported. Unlike Logback, there is only a single Filter interface used for global filters, logger filters and appender filters.

I've never had a clear description of the use cases behind Markers.  As far as I can gather, it is a specialized case of a user supplied context.  At the core, I think it would fit into a general user-supplied context object.  MDC and NDC would be part of the thread-supplied context and there'd be a global context and a call-site context.  In the core, I'd expect the context parameters to just be Object and let the layout level cast to specific known interfaces as needed.  During the synchronous extraction phase, an immutable package would be assembled for from log request parameters and the contexts based on the needs of the layout's formatting phase.


> 5. The XMLConfiguration is extremely simple. All it does is read the XML and convert the DOM structure to internal Node elements, which contain the node attributes, child node references and placeholders for the real object when it is constructed. It uses the XML element name to match to a Plugin, so instead of writing:
> 
> <appender name="console" class="org.apache.log4j.ConsoleAppender">
>  <param name="Target" value="System.out"/>
>  <layout class="org.apache.log4j.PatternLayout">
>     <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
>  </layout>
> </appender>
> 
> you write:
> 
> <appenders>
>   <Console name="console" target="SYSTEM_OUT">
>     <PatternLayout>%-5p %c{1} - %m%n</PatternLayout>
>   </Console>
> </appenders>
> 
> Note that it also would support
>   <Console>
>      <name>console</name>
>      <target>SYSTEM_OUT</target>
>     <PatternLayout>%-5p %c{1} - %m%n</PatternLayout>
>   </Console>
> 
> if you prefer using elements over attributes.

It is something necessary, but hopefully configuration ends up something outside the core using public methods to do its magic.

> 
> 5. I implemented a "Plugin" concept. All core components use annotations to describe their name and type. This is used by the XML configuration to determine the element names that are used in the configuration file. 
> a) Plugins are used for Logger, Appenders, Filters, etc. The BaseConfiguration processes the nodes created by XMLConfiguration and saves the resulting Objects as appropriate.
> b) PatternLayout uses plugins for the converters. To add a new converter an end user just needs to create the class with the correct annotation and add the package name to the XML configuration as an attribute.
> c) Configuration uses plugins to determine the Configuration implementation to use. The XMLConfiguration and DefaultConfiguration will always be present, but a weight can be specified to allow the new Configuration to take precedence. Again, simply placing the Configuration class (with the appropriate annotations) in the classpath will cause it to be used. However, if it is in a different package that package will have to be registered to be searched either by calling a static method on the PluginManager or via a system property (which hasn't been implemented yet).

Any thoughts on OSGi or other component frameworks?  Not now, maybe, never?

> 6. java.util.concurrent is used where appropriate. Accordingly, minimal locking takes place. No lock is held while Appenders are called which is a serious bug in Log4j 1.x as it causes deadlocks.
> 7, All internal components use the logger API for status reporting. A specific StatusLogger provides the implementation. 
> 8. Layouts return a byte array. In Logback Ceki recently came up with the idea of using encoders to allow binary data streams to be sent and received. While the requirement seems valid it seemed awkward to wrap a Layout in an encoder.

I think there will likely need to be separate byte and character Layout-like interfaces.  There are sometimes you are writing to a character-oriented destination like a database API and other times to a byte-oriented destination like a file system or network socket.  You'd like something like PatternLayout to be able to work in both instances (though it would need to be paired with a character encoder for a byte-oriented destination).

The XMLLayout in log4j 1.2 suffers from this since it really should be byte-oriented.  At the present, invalid XML can be generated if you do not use UTF-8 or UTF-16.

The Java serialization in the socket appender is effectively a byte-oriented layout and there is no reason you should not be able to connect it to a file appender. 


> 9. Obviously, everything leverages Java 5 (and might possibly require Java 6 since that is the JVM I've been using).
> 
> The API is not compatible with log4j 1.x. My intention would be to create a compatible API (to the degree possible) in a log4j12-api package.
> 

I believe that we should try to do design the core so it is the best core and then later see what, if any, needs to be tweaked.


> I've benchmarked this against Logback in both the SimplePerfTest and ThreadedPerfTest. Logback is slightly faster, probably due to the separation of the configuration from the logger, but the difference is about 1 or 2 hundredths of a second over a million log records that don't pass the log level (i.e. no log records are written). 
> 
> Although it is a decent amount of code this is meant to be just a starting point.  My hope is that others, like yourself, will look at this and figure out how to improve on it. And, of course, there are a bunch of Appenders, Filters, and other components that are completely missing. 
> 
> Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...

Posted by Ralph Goers <ra...@dslextreme.com>.
Thanks for trying it out. I hadn't actually built from the root - I've built the api and core separately - so I'm glad you were able to fix those problems.

I didn't want to commit code until I had the core of something that actually functioned. I struggled for a couple of weeks over how to attack XMLConfiguration. I don't like the way Logback does it, I didn't want to bring in baggage from a third party framework, JAXB isn't a good fit either. In short, I wanted something that can be extended without needing to add "rules" to the XML processor. See below for what I came up with.

First, while I looked at Log4j and somewhat at Logback, most of the core code is completely new. The exception to this is with the Converters for the PatternLayout. I took the EnhancedPatternLayout and modified it.

1. I first created an API that had the features I was looking for. That is in log4j2-api. While it supports logging a String or an Object it really uses a Message interface which is valuable as it allows users to log self-describing objects in a convenient manner.
2. I don't like the way Logback binds to the implementation. I used a technique I had used in a previous logging framework and used a file to define the implementation class. In theory, the API could be modified to support multiple logging implementation simultaneously, although I have no plans to implement that.
3. Logback suffers from a serious architectural problem that is rooted in Log4j. The configured loggers are mixed with the loggers returned from the Logger factory. This makes it impossible to reconfigure atomically. With Logback the reset method is called on the context which essentially causes the system to be in an undefined state until the new configuration is completed (log records that should be logged are lost). To solve this I used a design that I again borrowed from my previous framework. The configuration is separated and on a reconfiguration the new configuration will be created and then all the loggers will be updated to use it. While there will be a period where some loggers are using the old configuration and some the new there is never a point where loggers aren't configured at all.
4. Similar to Logback I added support for Markers and global filters. In addition, filters on Loggers are also supported. Unlike Logback, there is only a single Filter interface used for global filters, logger filters and appender filters.
5. The XMLConfiguration is extremely simple. All it does is read the XML and convert the DOM structure to internal Node elements, which contain the node attributes, child node references and placeholders for the real object when it is constructed. It uses the XML element name to match to a Plugin, so instead of writing:

<appender name="console" class="org.apache.log4j.ConsoleAppender">
  <param name="Target" value="System.out"/>
  <layout class="org.apache.log4j.PatternLayout">
     <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
  </layout>
</appender>

you write:

<appenders>
   <Console name="console" target="SYSTEM_OUT">
     <PatternLayout>%-5p %c{1} - %m%n</PatternLayout>
   </Console>
</appenders>

Note that it also would support
   <Console>
      <name>console</name>
      <target>SYSTEM_OUT</target>
     <PatternLayout>%-5p %c{1} - %m%n</PatternLayout>
   </Console>

if you prefer using elements over attributes.

5. I implemented a "Plugin" concept. All core components use annotations to describe their name and type. This is used by the XML configuration to determine the element names that are used in the configuration file. 
a) Plugins are used for Logger, Appenders, Filters, etc. The BaseConfiguration processes the nodes created by XMLConfiguration and saves the resulting Objects as appropriate.
b) PatternLayout uses plugins for the converters. To add a new converter an end user just needs to create the class with the correct annotation and add the package name to the XML configuration as an attribute.
c) Configuration uses plugins to determine the Configuration implementation to use. The XMLConfiguration and DefaultConfiguration will always be present, but a weight can be specified to allow the new Configuration to take precedence. Again, simply placing the Configuration class (with the appropriate annotations) in the classpath will cause it to be used. However, if it is in a different package that package will have to be registered to be searched either by calling a static method on the PluginManager or via a system property (which hasn't been implemented yet).
6. java.util.concurrent is used where appropriate. Accordingly, minimal locking takes place. No lock is held while Appenders are called which is a serious bug in Log4j 1.x as it causes deadlocks.
7, All internal components use the logger API for status reporting. A specific StatusLogger provides the implementation. 
8. Layouts return a byte array. In Logback Ceki recently came up with the idea of using encoders to allow binary data streams to be sent and received. While the requirement seems valid it seemed awkward to wrap a Layout in an encoder.
9. Obviously, everything leverages Java 5 (and might possibly require Java 6 since that is the JVM I've been using).

The API is not compatible with log4j 1.x. My intention would be to create a compatible API (to the degree possible) in a log4j12-api package.

I've benchmarked this against Logback in both the SimplePerfTest and ThreadedPerfTest. Logback is slightly faster, probably due to the separation of the configuration from the logger, but the difference is about 1 or 2 hundredths of a second over a million log records that don't pass the log level (i.e. no log records are written). 

Although it is a decent amount of code this is meant to be just a starting point.  My hope is that others, like yourself, will look at this and figure out how to improve on it. And, of course, there are a bunch of Appenders, Filters, and other components that are completely missing. 

Ralph

On May 13, 2010, at 10:17 PM, Curt Arnold wrote:

> log4j2-api/pom.xml has a stray </build> (see patch following).  Also, the master pom in BRANCH_2_0_EXPERIMENTAL/rgoers expects log4j2-docs to be in the same directory, when it is currently located one directory closer to root.  After those changes, I was able to run "mvn test"/
> 
> I haven't had a chance to review the rest of the commit, but it seems like a substantial amount of work that was done in isolation.  While things are still fresh, can you walk through the whats in this thing and the decisions that you made.
> 
> 
> Index: log4j12-api/pom.xml
> ===================================================================
> --- log4j12-api/pom.xml	(revision 944109)
> +++ log4j12-api/pom.xml	(working copy)
> @@ -28,7 +28,6 @@
>   <packaging>jar</packaging>
>   <name>Log4J Compatibility API</name>
>   <description>The Log4J Compatibility API</description>
> -</build>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: svn commit: r943816 [1/9] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/ log4j12-api/src/main/ log4j12-api/src/main/java/ log4j12-api/src/main/java/org/ log4j12-api/src/main/java/org/apache/ log4j12-api/sr...

Posted by Curt Arnold <ca...@apache.org>.
log4j2-api/pom.xml has a stray </build> (see patch following).  Also, the master pom in BRANCH_2_0_EXPERIMENTAL/rgoers expects log4j2-docs to be in the same directory, when it is currently located one directory closer to root.  After those changes, I was able to run "mvn test"/

I haven't had a chance to review the rest of the commit, but it seems like a substantial amount of work that was done in isolation.  While things are still fresh, can you walk through the whats in this thing and the decisions that you made.


Index: log4j12-api/pom.xml
===================================================================
--- log4j12-api/pom.xml	(revision 944109)
+++ log4j12-api/pom.xml	(working copy)
@@ -28,7 +28,6 @@
   <packaging>jar</packaging>
   <name>Log4J Compatibility API</name>
   <description>The Log4J Compatibility API</description>
-</build>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org