From commits-return-24-apmail-logging-commits-archive=logging.apache.org@logging.apache.org Tue Sep 6 14:28:20 2011 Return-Path: X-Original-To: apmail-logging-commits-archive@minotaur.apache.org Delivered-To: apmail-logging-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0D47A7380 for ; Tue, 6 Sep 2011 14:28:20 +0000 (UTC) Received: (qmail 75305 invoked by uid 500); 6 Sep 2011 14:28:19 -0000 Delivered-To: apmail-logging-commits-archive@logging.apache.org Received: (qmail 75246 invoked by uid 500); 6 Sep 2011 14:28:19 -0000 Mailing-List: contact commits-help@logging.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@logging.apache.org Delivered-To: mailing list commits@logging.apache.org Received: (qmail 75217 invoked by uid 99); 6 Sep 2011 14:28:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 14:28:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 14:28:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BFCD223889B3; Tue, 6 Sep 2011 14:27:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1165682 [1/3] - in /logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers: ./ log4j12-api/ log4j12-api/src/main/java/org/apache/log4j/ log4j12-api/src/site/ log4j2-api/ log4j2-api/src/main/java/org/apache/logging/log4j/ log4j2-api/src/main... Date: Tue, 06 Sep 2011 14:27:48 -0000 To: commits@logging.apache.org From: rgoers@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110906142754.BFCD223889B3@eris.apache.org> Author: rgoers Date: Tue Sep 6 14:27:43 2011 New Revision: 1165682 URL: http://svn.apache.org/viewvc?rev=1165682&view=rev Log: Started adding documentation. Start fixing checkstyle errors Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/checkstyle-header.txt logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/checkstyle.xml logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/findbugs-exclude-filter.xml logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/site/ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/site/site.xml logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/status/ - copied from r1147720, 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/status/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/site/ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/site/site.xml logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/plugins/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/filter/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/javaee/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/jmx/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/lookup/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/selector/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-jcl/src/main/java/org/apache/logging/log4j/jcl/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-jcl/src/site/ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-jcl/src/site/site.xml logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/slf4j-impl/src/main/java/org/apache/logging/slf4j/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/slf4j-impl/src/main/java/org/slf4j/helpers/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/slf4j-impl/src/main/java/org/slf4j/impl/package-info.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/slf4j-impl/src/site/ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/slf4j-impl/src/site/site.xml logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/changes/ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/changes/changes.xml logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/resources/ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/resources/css/ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/resources/css/site.css logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/resources/images/ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/resources/images/logo.jpg (with props) logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/resources/images/ls-logo.jpg (with props) logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/site.xml logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/xdoc/ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/src/site/xdoc/index.xml Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/pom.xml logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/pom.xml 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/Marker.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/MarkerManager.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/ThreadContext.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/message/FormattedMessage.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/LoggerNameAwareMessage.java 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/AbstractLogger.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/AbstractLoggerWrapper.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/java/org/apache/logging/log4j/spi/LoggerContextFactory.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/LoggerFactory.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/status/StatusData.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/status/StatusListener.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/pom.xml 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/Lifecycle.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/Log4jContextFactory.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/AbstractManager.java 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/DefaultErrorHandler.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/FileManager.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/Agent.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/flume/FlumeAvroManager.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RolloverStrategyBase.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/SizeBasedTriggeringPolicy.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/ActionBase.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/helper/package.html 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/ConfigurationFactory.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/Property.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/AppenderRefPlugin.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PropertiesPlugin.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/FilterBase.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/Constants.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/helpers/FileUtils.java 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/javaee/ContextAnchor.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/jmx/Log4jManager.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/jmx/Log4jManagerMBean.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/layout/AbstractStringLayout.java 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/lookup/Interpolator.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/DatagramOutputStream.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/DatagramSocketManager.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/net/TCPSocketManager.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/LogEventPatternConverter.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/pattern/package.html logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/selector/BasicContextSelector.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/main/java/org/apache/logging/log4j/core/selector/JNDIContextSelector.java 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/java/org/apache/logging/log4j/core/LoggerTest.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/StrictXMLConfigTest.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderSizeTest.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderTimeAndSizeTest.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderTimeTest.java 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/net/JMSQueueTest.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-core/src/test/java/org/apache/logging/log4j/core/net/JMSTopicTest.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-jcl/pom.xml logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-jcl/src/test/java/org/apache/logging/log4j/jcl/LoggerTest.java logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/pom.xml logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/slf4j-impl/pom.xml logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/slf4j-impl/src/test/java/org/apache/logging/slf4j/LoggerTest.java Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/checkstyle-header.txt URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/checkstyle-header.txt?rev=1165682&view=auto ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/checkstyle-header.txt (added) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/checkstyle-header.txt Tue Sep 6 14:27:43 2011 @@ -0,0 +1,16 @@ +/* + * 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. + */ Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/checkstyle.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/checkstyle.xml?rev=1165682&view=auto ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/checkstyle.xml (added) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/checkstyle.xml Tue Sep 6 14:27:43 2011 @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/findbugs-exclude-filter.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/findbugs-exclude-filter.xml?rev=1165682&view=auto ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/findbugs-exclude-filter.xml (added) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/findbugs-exclude-filter.xml Tue Sep 6 14:27:43 2011 @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + Modified: 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=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/pom.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/pom.xml Tue Sep 6 14:27:43 2011 @@ -28,6 +28,9 @@ jar Log4J Compatibility API The Log4J Compatibility API + + ${basedir}/.. + junit @@ -38,27 +41,132 @@ org.apache.logging log4j2-api - 1.99.0-SNAPSHOT org.apache.logging log4j2-core - 1.99.0-SNAPSHOT org.apache.logging log4j2-core - 1.99.0-SNAPSHOT test-jar test - - - apache.website - scp://people.apache.org/home/carnold/public_html/log4j/companions/pattern-layout - - - + + + + org.apache.maven.plugins + maven-changes-plugin + 2.6 + + + + changes-report + + + + + %URL%/show_bug.cgi?id=%ISSUE% + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.7 + + + ${log4j.parent.dir}/checkstyle.xml + ${log4j.parent.dir}/checkstyle-suppressions.xml + false + basedir=${basedir} + licensedir=${log4j.parent.dir}/checkstyle-header.txt + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + + false + true + + + issue + a + JIRA issue: + + + doubt + a + Troublesome: + + + compare + a + Compare with: + + + + + + non-aggregate + + javadoc + + + + + + org.codehaus.mojo + findbugs-maven-plugin + 2.3.2 + + Normal + Default + findbugs-exclude-filter.xml + + + + org.apache.maven.plugins + maven-jxr-plugin + 2.3 + + + non-aggregate + + jxr + + + + aggregate + + aggregate + + + + + + org.apache.maven.plugins + maven-pmd-plugin + + 1.5 + + + + org.codehaus.mojo + cobertura-maven-plugin + 2.2 + + + + + + + + + Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/package-info.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/package-info.java?rev=1165682&view=auto ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/package-info.java (added) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/main/java/org/apache/log4j/package-info.java Tue Sep 6 14:27:43 2011 @@ -0,0 +1,2 @@ +/** Log4j 1.x compatibility layer */ +package org.apache.log4j; \ No newline at end of file Added: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/site/site.xml URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/site/site.xml?rev=1165682&view=auto ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/site/site.xml (added) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j12-api/src/site/site.xml Tue Sep 6 14:27:43 2011 @@ -0,0 +1,35 @@ + + + + Logging Services + ../images/ls-logo.jpg + ../index.html + + + ../images/logo.jpg + + + + + + + + + + Modified: 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=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/pom.xml (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/pom.xml Tue Sep 6 14:27:43 2011 @@ -28,34 +28,9 @@ jar Log4J API The Log4J API - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.7 - - - - issue - a - JIRA issue: - - - doubt - a - Troublesome: - - - compare - a - Compare with: - - - - - - + + ${basedir}/.. + junit @@ -64,12 +39,120 @@ test - - - apache.website - scp://people.apache.org/home/carnold/public_html/log4j/companions/pattern-layout - - - + + + + org.apache.maven.plugins + maven-changes-plugin + 2.6 + + + + changes-report + + + + + %URL%/show_bug.cgi?id=%ISSUE% + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 2.7 + + + ${log4j.parent.dir}/checkstyle.xml + ${log4j.parent.dir}/checkstyle-suppressions.xml + false + basedir=${basedir} + licensedir=${log4j.parent.dir}/checkstyle-header.txt + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + + false + true + + + issue + a + JIRA issue: + + + doubt + a + Troublesome: + + + compare + a + Compare with: + + + + + + non-aggregate + + javadoc + + + + + + org.codehaus.mojo + findbugs-maven-plugin + 2.3.2 + + Normal + Default + ${log4j.parent.dir}/findbugs-exclude-filter.xml + + + + org.apache.maven.plugins + maven-jxr-plugin + 2.3 + + + non-aggregate + + jxr + + + + aggregate + + aggregate + + + + + + org.apache.maven.plugins + maven-pmd-plugin + + 1.5 + + + + org.codehaus.mojo + cobertura-maven-plugin + 2.2 + + + + + + + + + Modified: 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=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Level.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Level.java Tue Sep 6 14:27:43 2011 @@ -33,7 +33,38 @@ package org.apache.logging.log4j; * @doubt see LOG4J-41 */ public enum Level { - OFF(0), FATAL(1), ERROR(2), WARN(3), INFO(4), DEBUG(5), TRACE(6), ALL(Integer.MAX_VALUE); + /** + * No events will be logged. + */ + OFF(0), + /** + * A severe error that will prevent the application from continuing. + */ + FATAL(1), + /** + * An error in the application, possibly recoverable. + */ + ERROR(2), + /** + * An event that might possible lead to an error. + */ + WARN(3), + /** + * An event for informational purposes. + */ + INFO(4), + /** + * A general debugging event. + */ + DEBUG(5), + /** + * A fine-grained debug message, typically capturing the flow through the application. + */ + TRACE(6), + /** + * All events should be logged. + */ + ALL(Integer.MAX_VALUE); private final int intLevel; @@ -45,7 +76,8 @@ public enum Level { * 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. + * @param sArg The name of the desired Level. + * @return The Level associated with the String. */ public static Level toLevel(String sArg) { return toLevel(sArg, DEBUG); @@ -55,6 +87,10 @@ public enum Level { * Convert the string passed as argument to a level. If the * conversion fails, then this method returns the value of * defaultLevel. + * + * @param sArg The name of the desired Level. + * @param defaultLevel The Level to use if the String is invalid. + * @return The LEvel associated with the String. */ public static Level toLevel(String sArg, Level defaultLevel) { if (sArg == null) { Modified: 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=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/LogManager.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/LogManager.java Tue Sep 6 14:27:43 2011 @@ -1,6 +1,22 @@ +/* + * 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.internal.StatusLogger; +import org.apache.logging.log4j.status.StatusLogger; import org.apache.logging.log4j.spi.LoggerContext; import org.apache.logging.log4j.spi.LoggerContextFactory; @@ -45,8 +61,7 @@ public class LogManager { Enumeration enumResources = null; try { enumResources = cl.getResources(LOGGER_RESOURCE); - } - catch (IOException e) { + } catch (IOException e) { logger.fatal("Unable to locate " + LOGGER_RESOURCE, e); } @@ -134,7 +149,8 @@ public class LogManager { } /** - * Returns a LoggerContext + * Returns a LoggerContext. + * * @param currentContext if false the LoggerContext appropriate for the caller of this method is returned. For * example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be * returned and if the caller is a class in the container's classpath then a different LoggerContext may be Modified: 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=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Logger.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Logger.java Tue Sep 6 14:27:43 2011 @@ -1,19 +1,19 @@ /* -* 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. -*/ + * 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; Modified: 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=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Marker.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Marker.java Tue Sep 6 14:27:43 2011 @@ -19,12 +19,30 @@ package org.apache.logging.log4j; import java.io.Serializable; /** + * Markers are objects that are used to add easily filterable information to log messages. + * + * Markers can be hierarchical - each Marker may have a parent. This allows for broad categories + * being subdivided into more specific categories. An example might be a Marker named "Error" with + * children named "SystemError" and "ApplicationError". */ public interface Marker extends Serializable { - public String getName(); + /** + * Returns the name of this Marker. + * @return The name of the Marker. + */ + String getName(); - public Marker getParent(); + /** + * Returns the parent of this Marker. + * @return The parent Marker or null if this Marker has no parent. + */ + Marker getParent(); - public boolean isInstanceOf(Marker m); + /** + * Checks whether this Marker is an instance of the specified Marker. + * @param m The Marker to check. + * @return true of this Marker or one of its ancestors is the specified Marker, false otherwise. + */ + boolean isInstanceOf(Marker m); } Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/MarkerManager.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/MarkerManager.java?rev=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/MarkerManager.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/MarkerManager.java Tue Sep 6 14:27:43 2011 @@ -21,17 +21,33 @@ import java.util.concurrent.ConcurrentMa /** - * + * Applications create Markers by using the Marker Manager. All Markers created by this Manager are + * immutable. */ -public class MarkerManager { +public final class MarkerManager { private static ConcurrentMap markerMap = new ConcurrentHashMap(); + private MarkerManager() { + } + + /** + * Retrieve a Marker or create a Marker that has no parent. + * @param name The name of the Marker. + * @return The Marker with the specified name. + */ public static Marker getMarker(String name) { markerMap.putIfAbsent(name, new Log4JMarker(name)); return markerMap.get(name); } + /** + * Retrieves or creates a Marker with the specified parent. The parent must have been previously created. + * @param name The name of the Marker. + * @param parent The name of the parent Marker. + * @return The Marker with the specified name. + * @throws IllegalArgumentException if the parent Marker does not exist. + */ public static Marker getMarker(String name, String parent) { Marker parentMarker = markerMap.get(parent); if (parentMarker == null) { @@ -40,6 +56,12 @@ public class MarkerManager { return getMarker(name, parentMarker); } + /** + * Retrieves or creates a Marker with the specified parent. + * @param name The name of the Marker. + * @param parent The parent Marker. + * @return The Marker with the specified name. + */ public static Marker getMarker(String name, Marker parent) { markerMap.putIfAbsent(name, new Log4JMarker(name, parent)); return markerMap.get(name); Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/ThreadContext.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/ThreadContext.java?rev=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/ThreadContext.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/ThreadContext.java Tue Sep 6 14:27:43 2011 @@ -1,18 +1,18 @@ /* * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with + * 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 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 + * 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. + * See the license for the specific language governing permissions and + * limitations under the license. */ package org.apache.logging.log4j; @@ -31,7 +31,7 @@ import java.util.Stack; */ public final class ThreadContext { - private static ThreadLocal> LOCAL_MAP = + private static ThreadLocal> localMap = new InheritableThreadLocal>() { protected Map initialValue() { return new HashMap(); @@ -42,7 +42,7 @@ public final class ThreadContext { } }; - private static ThreadLocal> LOCAL_STACK = + private static ThreadLocal> localStack = new InheritableThreadLocal>() { protected Stack initialValue() { return new Stack(); @@ -70,7 +70,7 @@ public final class ThreadContext { * @param value The key value. */ public static void put(String key, Object value) { - LOCAL_MAP.get().put(key, value); + localMap.get().put(key, value); } /** @@ -81,7 +81,7 @@ public final class ThreadContext { * @return The value of the object or null. */ public static Object get(String key) { - return LOCAL_MAP.get().get(key); + return localMap.get().get(key); } /** @@ -90,14 +90,14 @@ public final class ThreadContext { * @param key The key to remove. */ public static void remove(String key) { - LOCAL_MAP.get().remove(key); + localMap.get().remove(key); } /** * Clear the context. */ public static void clear() { - LOCAL_MAP.get().clear(); + localMap.get().clear(); } /** @@ -106,7 +106,7 @@ public final class ThreadContext { * @return True if the key is in the context, false otherwise. */ public static boolean containsKey(String key) { - return LOCAL_MAP.get().containsKey(key); + return localMap.get().containsKey(key); } /** @@ -115,14 +115,14 @@ public final class ThreadContext { * @return a copy of the context. */ public static Map getContext() { - return new HashMap(LOCAL_MAP.get()); + return new HashMap(localMap.get()); } /** * Clear the stack for this thread. */ public static void clearStack() { - LOCAL_STACK.get().clear(); + localStack.get().clear(); } /** @@ -130,7 +130,7 @@ public final class ThreadContext { * @return A copy of this thread's stack. */ public static Stack cloneStack() { - return (Stack) LOCAL_STACK.get().clone(); + return (Stack) localStack.get().clone(); } /** @@ -138,16 +138,17 @@ public final class ThreadContext { * @param stack The stack to use. */ public static void setStack(Stack stack) { - LOCAL_STACK.set(stack); + localStack.set(stack); } /** * Get the current nesting depth of this thread's stack. + * @return the number of items in the stack. * * @see #setMaxDepth */ public static int getDepth() { - return LOCAL_STACK.get().size(); + return localStack.get().size(); } /** @@ -159,7 +160,7 @@ public final class ThreadContext { * @return String The innermost diagnostic context. */ public static String pop() { - Stack s = LOCAL_STACK.get(); + Stack s = localStack.get(); if (s.isEmpty()) { return ""; } @@ -176,7 +177,7 @@ public final class ThreadContext { * @return String The innermost diagnostic context. */ public static String peek() { - Stack s = LOCAL_STACK.get(); + Stack s = localStack.get(); if (s.isEmpty()) { return ""; } @@ -192,7 +193,7 @@ public final class ThreadContext { * @param message The new diagnostic context information. */ public static void push(String message) { - LOCAL_STACK.get().push(message); + localStack.get().push(message); } /** @@ -214,7 +215,7 @@ public final class ThreadContext { * memory. */ public static void removeStack() { - LOCAL_STACK.remove(); + localStack.remove(); } /** Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java?rev=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java Tue Sep 6 14:27:43 2011 @@ -1,11 +1,34 @@ +/* + * 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.message; /** - * + * A Message that can have a format String attached to it. */ -public interface FormattedMessage extends Message -{ +public interface FormattedMessage extends Message { + /** + * Set the message format. + * @param format The message format. + */ void setFormat(String format); + /** + * Return the message format. + * @return the message format String. + */ String getFormat(); } Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java?rev=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java Tue Sep 6 14:27:43 2011 @@ -16,18 +16,24 @@ */ package org.apache.logging.log4j.message; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.internal.StatusLogger; +import org.apache.logging.log4j.status.StatusLogger; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; /** + * This class is not the recommended way to Localize messages. It is provided to provide some level + * of compatibility with Log4j 1.x. * + * The recommended way to localize messages is to simply log a message id. Log events should + * then be recorded without formatting into some kind of data store. The application that is + * used to read the events and display them to the user should also localize and format the + * messages for the end user. */ public class LocalizedMessage extends ParameterizedMessage implements LoggerNameAwareMessage { + private static final long serialVersionUID = 3893703791567290742L; private String bundleId; @@ -39,6 +45,9 @@ public class LocalizedMessage extends Pa private String loggerName = null; + /** + * The basic constructor. + */ public LocalizedMessage() { super(); setup(null, null, null); @@ -184,13 +193,19 @@ public class LocalizedMessage extends Pa setup(null, null, locale); } - public void setLoggerName(String name) - { + /** + * Set the name of the Logger. + * @param name The name of the Logger. + */ + public void setLoggerName(String name) { this.loggerName = name; } - public String getLoggerName() - { + /** + * Return the name of the Logger. + * @return the name of the Logger. + */ + public String getLoggerName() { return this.loggerName; } @@ -200,6 +215,12 @@ public class LocalizedMessage extends Pa this.locale = locale; } + /** + * Return the formatted message after looking up the format in the resource bundle. + * @param messagePattern The key for the resource bundle or the pattern if the bundle doesn't contain the key. + * @param args The parameters. + * @return The formatted message String. + */ @Override public String formatMessage(String messagePattern, String[] args) { ResourceBundle bundle = this.bundle; @@ -218,6 +239,9 @@ public class LocalizedMessage extends Pa /** * Override this to use a ResourceBundle.Control in Java 6 * @param key The key to the bundle. + * @param locale The locale to use when formatting the message. + * @param loop If true the key will be treated as a package or class name and a resource bundle will + * be located based on all or part of the package name. If false the key is expected to be the exact bundle id. * @return The ResourceBundle. */ protected ResourceBundle getBundle(String key, Locale locale, boolean loop) { Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/LoggerNameAwareMessage.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/LoggerNameAwareMessage.java?rev=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/LoggerNameAwareMessage.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/LoggerNameAwareMessage.java Tue Sep 6 14:27:43 2011 @@ -1,13 +1,34 @@ +/* + * 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.message; -import org.apache.logging.log4j.Logger; - /** * Message that is interested in the name of the Logger. */ -public interface LoggerNameAwareMessage -{ +public interface LoggerNameAwareMessage { + /** + * The name of the Logger. + * @param name The name of the Logger. + */ void setLoggerName(String name); + /** + * Returns the name of the Logger. + * @return The name of the Logger. + */ String getLoggerName(); } Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/Message.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/Message.java?rev=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/Message.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/Message.java Tue Sep 6 14:27:43 2011 @@ -17,7 +17,6 @@ package org.apache.logging.log4j.message; import java.io.Serializable; -import java.util.Map; /** * An interface for various Message implementations that can be logged. Messages can act as wrappers Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/ObjectMessage.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/ObjectMessage.java?rev=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/ObjectMessage.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/ObjectMessage.java Tue Sep 6 14:27:43 2011 @@ -20,27 +20,43 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; -import java.util.Map; - /** * Handles messages that contain an Object. */ public class ObjectMessage implements Message, Serializable { + private static final long serialVersionUID = -5903272448334166185L; + private transient Object obj; + /** + * Create the ObjectMessage. + * @param obj The Object to format. + */ public ObjectMessage(Object obj) { this.obj = obj; } + /** + * Return the formatted object message. + * @return the formatted object message. + */ public String getFormattedMessage() { return obj.toString(); } + /** + * Returns the object formatted using its toString method. + * @return the String representation of the object. + */ public String getMessageFormat() { return obj.toString(); } + /** + * Returns the object as if it were a parameter. + * @return The object. + */ public Object[] getParameters() { return new Object[]{obj}; } Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java?rev=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java Tue Sep 6 14:27:43 2011 @@ -43,10 +43,20 @@ public class ParameterizedMessage implem private transient String formattedMessage; private transient Throwable throwable; + /** + * Create the ParameterizedMessage. + */ public ParameterizedMessage() { this(null, null, null); } + /** + * Create the parameterizedMessage. + * @param messagePattern The message "format" string. This will be a String containing "{}" placeholders + * where parameters should be substituted. + * @param stringArgs The arguments for substitution. + * @param throwable A Throwable. + */ public ParameterizedMessage(String messagePattern, String[] stringArgs, Throwable throwable) { this.messagePattern = messagePattern; this.stringArgs = stringArgs; @@ -72,10 +82,21 @@ public class ParameterizedMessage implem parseArguments(arguments); } + /** + * Constructor with a pattern and a single parameter. + * @param messagePattern The message pattern. + * @param arg The parameter. + */ public ParameterizedMessage(String messagePattern, Object arg) { this(messagePattern, new Object[]{arg}); } + /** + * Constructor with a pattern and two parameters. + * @param messagePattern The message pattern. + * @param arg1 The first parameter. + * @param arg2 The second parameter. + */ public ParameterizedMessage(String messagePattern, Object arg1, Object arg2) { this(messagePattern, new Object[]{arg1, arg2}); } @@ -106,6 +127,10 @@ public class ParameterizedMessage implem } } + /** + * Return the formatted message. + * @return the formatted message. + */ public String getFormattedMessage() { if (formattedMessage == null) { formattedMessage = formatMessage(messagePattern, stringArgs); @@ -113,15 +138,27 @@ public class ParameterizedMessage implem return formattedMessage; } + /** + * Returns the message pattern. + * @return the message pattern. + */ public String getMessageFormat() { return messagePattern; } + /** + * Set the message pattern. + * @param messagePattern The message pattern. + */ public void setMessageFormat(String messagePattern) { this.messagePattern = messagePattern; this.formattedMessage = null; } + /** + * Returns the message parameters. + * @return the message parameters. + */ public Object[] getParameters() { if (argArray != null) { return argArray; @@ -129,16 +166,28 @@ public class ParameterizedMessage implem return stringArgs; } + /** + * Sets the parameters for the message. + * @param parameters The parameters. + */ public void setParameters(String[] parameters) { this.stringArgs = parameters; this.formattedMessage = null; } + /** + * Sets the parameters for the message. + * @param parameters The parameters. + */ public void setParameters(Object[] parameters) { parseArguments(parameters); this.formattedMessage = null; } + /** + * Set the Throwable for the message. + * @param throwable The Throwable. + */ public void setThrowable(Throwable throwable) { this.throwable = throwable; } @@ -299,6 +348,22 @@ public class ParameterizedMessage implem return result; } + /** + * This method performs a deep toString of the given Object. + * Primitive arrays are converted using their respective Arrays.toString methods while + * special handling is implemented for "container types", i.e. Object[], Map and Collection because those could + * contain themselves. + *

+ * It should be noted that neither AbstractMap.toString() nor AbstractCollection.toString() implement such a + * behavior. They only check if the container is directly contained in itself, but not if a contained container + * contains the original one. Because of that, Arrays.toString(Object[]) isn't safe either. + * Confusing? Just read the last paragraph again and check the respective toString() implementation. + *

+ * This means, in effect, that logging would produce a usable output even if an ordinary System.out.println(o) + * would produce a relatively hard-to-debug StackOverflowError. + * @param o The object. + * @return The String representation. + */ public static String deepToString(Object o) { if (o == null) { return null; Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/SimpleMessage.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/SimpleMessage.java?rev=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/SimpleMessage.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/SimpleMessage.java Tue Sep 6 14:27:43 2011 @@ -17,7 +17,6 @@ package org.apache.logging.log4j.message; import java.io.Serializable; -import java.util.Map; /** * The simplest possible implementation of Message. It just returns the String given as the constructor argument. @@ -27,22 +26,41 @@ public class SimpleMessage implements Me private final String message; + /** + * Basic constructor. + */ public SimpleMessage() { this(null); } + /** + * Constructor that includes the message. + * @param message The String message. + */ public SimpleMessage(String message) { this.message = message; } + /** + * Return the message. + * @return the message. + */ public String getFormattedMessage() { return message; } + /** + * Return the message. + * @return the message. + */ public String getMessageFormat() { return message; } + /** + * Returns null since there are no parameters. + * @return null. + */ public Object[] getParameters() { return null; } Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java?rev=1165682&r1=1165681&r2=1165682&view=diff ============================================================================== --- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java (original) +++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java Tue Sep 6 14:27:43 2011 @@ -19,33 +19,42 @@ package org.apache.logging.log4j.message import java.io.Serializable; /** - * - */ - -/** - * The StructuredData identifier + * The StructuredData identifier. */ public class StructuredDataId implements Serializable { private static final long serialVersionUID = 9031746276396249990L; - public static StructuredDataId TIME_QUALITY = new StructuredDataId("timeQuality", null, + /** + * RFC 5424 Time Quality. + */ + public static final StructuredDataId TIME_QUALITY = new StructuredDataId("timeQuality", null, new String[]{"tzKnown", "isSynced", "syncAccuracy"}); - public static StructuredDataId ORIGIN = new StructuredDataId("origin", null, + /** + * RFC 5424 Origin. + */ + public static final StructuredDataId ORIGIN = new StructuredDataId("origin", null, new String[]{"ip", "enterpriseId", "software", "swVersion"}); - public static StructuredDataId META = new StructuredDataId("meta", null, + /** + * RFC 5424 Meta. + */ + public static final StructuredDataId META = new StructuredDataId("meta", null, new String[]{"sequenceId", "sysUpTime", "language"}); + /** + * Reserved enterprise number. + */ public static final int RESERVED = -1; private final String name; private final int enterpriseNumber; private final String[] required; private final String[] optional; + private static final int MAX_LENGTH = 32; protected StructuredDataId(String name, String[] required, String[] optional) { int index = -1; if (name != null) { - if (name.length() > 32) { + if (name.length() > MAX_LENGTH) { throw new IllegalArgumentException("Length of id exceeds maximum of 32 characters: " + name); } index = name.indexOf("@"); @@ -83,13 +92,18 @@ public class StructuredDataId implements this.name = name; this.enterpriseNumber = enterpriseNumber; String id = enterpriseNumber < 0 ? name : name + "@" + enterpriseNumber; - if (id.length() > 32) { + if (id.length() > MAX_LENGTH) { throw new IllegalArgumentException("Length of id exceeds maximum of 32 characters: " + id); } this.required = required; this.optional = optional; } + /** + * Creates an id using another id to supply default values. + * @param id The original StructuredDataId. + * @return the new StructuredDataId. + */ public StructuredDataId makeId(StructuredDataId id) { if (id == null) { return this; @@ -97,6 +111,12 @@ public class StructuredDataId implements return makeId(id.getName(), id.getEnterpriseNumber()); } + /** + * Creates an id based on the current id. + * @param defaultId The default id to use if this StructuredDataId doesn't have a name. + * @param enterpriseNumber The enterprise number. + * @return a StructuredDataId. + */ public StructuredDataId makeId(String defaultId, int enterpriseNumber) { String id; String[] req; @@ -117,22 +137,42 @@ public class StructuredDataId implements return new StructuredDataId(id, enterpriseNumber, req, opt); } + /** + * Returns a list of required keys. + * @return a List of required keys or null if none have been provided. + */ public String[] getRequired() { return required; } + /** + * Returns a list of optional keys. + * @return a List of optional keys or null if none have been provided. + */ public String[] getOptional() { return optional; } + /** + * Return the StructuredDataId name. + * @return the StructuredDataId name. + */ public String getName() { return name; } + /** + * Return the enterprise number. + * @return the enterprise number. + */ public int getEnterpriseNumber() { return enterpriseNumber; } + /** + * Indicates if the id is reserved. + * @return true if the id uses the reserved enterprise number, false otherwise. + */ public boolean isReserved() { return enterpriseNumber <= 0; } @@ -140,4 +180,4 @@ public class StructuredDataId implements public String toString() { return isReserved() ? name : name + "@" + enterpriseNumber; } -} \ No newline at end of file +}