Author: carnold
Date: Wed Dec 21 10:45:18 2005
New Revision: 358340
URL: http://svn.apache.org/viewcvs?rev=358340&view=rev
Log:
Bug 35452: Restore missing contants in 1.3 branch
Added:
logging/log4j/trunk/tests/src/java/org/apache/log4j/LogManagerTest.java
logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/LogLogTest.java
Modified:
logging/log4j/trunk/src/java/org/apache/log4j/LogManager.java
logging/log4j/trunk/src/java/org/apache/log4j/helpers/LogLog.java
logging/log4j/trunk/tests/src/java/org/apache/log4j/CoreTestSuite.java
Modified: logging/log4j/trunk/src/java/org/apache/log4j/LogManager.java
URL:
http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/LogManager.java?rev=358340&r1=358339&r2=358340&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/LogManager.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/LogManager.java Wed Dec 21
10:45:18 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
+ * 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.
@@ -40,6 +40,38 @@
*
* @author Ceki Gülcü */
public class LogManager {
+
+ /**
+ * @deprecated This variable is for internal use only. It will
+ * become package protected in future versions.
+ * */
+ static public final String DEFAULT_CONFIGURATION_FILE = "log4j.properties";
+
+ /**
+ * @deprecated This variable is for internal use only. It will
+ * become package protected in future versions.
+ * */
+ static final String DEFAULT_XML_CONFIGURATION_FILE = "log4j.xml";
+
+ /**
+ * @deprecated This variable is for internal use only. It will
+ * become private in future versions.
+ * */
+ static final public String DEFAULT_CONFIGURATION_KEY="log4j.configuration";
+
+ /**
+ * @deprecated This variable is for internal use only. It will
+ * become private in future versions.
+ * */
+ static final public String CONFIGURATOR_CLASS_KEY="log4j.configuratorClass";
+
+ /**
+ * @deprecated This variable is for internal use only. It will
+ * become private in future versions.
+ */
+ public static final String DEFAULT_INIT_OVERRIDE_KEY =
+ "log4j.defaultInitOverride";
+
/**
* Concurrency guard.
*/
Modified: logging/log4j/trunk/src/java/org/apache/log4j/helpers/LogLog.java
URL:
http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/helpers/LogLog.java?rev=358340&r1=358339&r2=358340&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/helpers/LogLog.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/helpers/LogLog.java Wed Dec
21 10:45:18 2005
@@ -36,6 +36,28 @@
/**
Defining this value makes log4j print log4j-internal debug
statements to <code>System.out</code>.
+
+ <p> The value of this string is <b>log4j.debug</b>.
+
+ <p>Note that the search for all option names is case sensitive. */
+ public static final String DEBUG_KEY="log4j.debug";
+
+
+ /**
+ Defining this value makes log4j components print log4j-internal
+ debug statements to <code>System.out</code>.
+
+ <p> The value of this string is <b>log4j.configDebug</b>.
+
+ <p>Note that the search for all option names is case sensitive.
+
+ @deprecated Use [EMAIL PROTECTED] #DEBUG_KEY} instead.
+ */
+ public static final String CONFIG_DEBUG_KEY="log4j.configDebug";
+
+ /**
+ Defining this value makes log4j print log4j-internal debug
+ statements to <code>System.out</code>.
<p> The value of this string is <b>log4j.debug</b>.
Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/CoreTestSuite.java
URL:
http://svn.apache.org/viewcvs/logging/log4j/trunk/tests/src/java/org/apache/log4j/CoreTestSuite.java?rev=358340&r1=358339&r2=358340&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/CoreTestSuite.java
(original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/CoreTestSuite.java Wed
Dec 21 10:45:18 2005
@@ -39,6 +39,8 @@
s.addTestSuite(org.apache.log4j.rolling.helper.FileNamePatternTestCase.class);
s.addTestSuite(org.apache.log4j.pattern.FormattingInfoTest.class);
s.addTestSuite(org.apache.log4j.LevelTest.class);
+ s.addTestSuite(org.apache.log4j.LogManagerTest.class);
+ s.addTestSuite(org.apache.log4j.helpers.LogLogTest.class);
return s;
}
}
Added: logging/log4j/trunk/tests/src/java/org/apache/log4j/LogManagerTest.java
URL:
http://svn.apache.org/viewcvs/logging/log4j/trunk/tests/src/java/org/apache/log4j/LogManagerTest.java?rev=358340&view=auto
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/LogManagerTest.java
(added)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/LogManagerTest.java Wed
Dec 21 10:45:18 2005
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ */
+
+package org.apache.log4j;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Tests for LogManager
+ *
+ * @author Curt Arnold
+ **/
+public class LogManagerTest extends TestCase {
+ /**
+ * Create new instance of LogManagerTest.
+ * @param testName test name
+ */
+ public LogManagerTest(final String testName) {
+ super(testName);
+ }
+
+ /**
+ * Check value of DEFAULT_CONFIGURATION_FILE.
+ * @deprecated since constant is deprecated
+ */
+ public void testDefaultConfigurationFile() {
+ assertEquals("log4j.properties", LogManager.DEFAULT_CONFIGURATION_FILE);
+ }
+
+ /**
+ * Check value of DEFAULT_XML_CONFIGURATION_FILE.
+ * @deprecated since constant is deprecated
+ */
+ public void testDefaultXmlConfigurationFile() {
+ assertEquals("log4j.xml", LogManager.DEFAULT_XML_CONFIGURATION_FILE);
+ }
+
+ /**
+ * Check value of DEFAULT_CONFIGURATION_KEY.
+ * @deprecated since constant is deprecated
+ */
+ public void testDefaultConfigurationKey() {
+ assertEquals("log4j.configuration", LogManager.DEFAULT_CONFIGURATION_KEY);
+ }
+
+ /**
+ * Check value of CONFIGURATOR_CLASS_KEY.
+ * @deprecated since constant is deprecated
+ */
+ public void testConfiguratorClassKey() {
+ assertEquals("log4j.configuratorClass",
LogManager.CONFIGURATOR_CLASS_KEY);
+ }
+
+ /**
+ * Check value of DEFAULT_INIT_OVERRIDE_KEY.
+ * @deprecated since constant is deprecated
+ */
+ public void testDefaultInitOverrideKey() {
+ assertEquals("log4j.defaultInitOverride",
LogManager.DEFAULT_INIT_OVERRIDE_KEY);
+ }
+}
Added:
logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/LogLogTest.java
URL:
http://svn.apache.org/viewcvs/logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/LogLogTest.java?rev=358340&view=auto
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/LogLogTest.java
(added)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/LogLogTest.java
Wed Dec 21 10:45:18 2005
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+package org.apache.log4j.helpers;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Tests for LogLog.
+ *
+ * @author Curt Arnold
+ **/
+public class LogLogTest extends TestCase {
+ /**
+ * Create new instance of LogLogTest.
+ * @param testName test name
+ */
+ public LogLogTest(final String testName) {
+ super(testName);
+ }
+
+ /**
+ * Check value of DEBUG_KEY.
+ */
+ public void testDebugKey() {
+ assertEquals("log4j.debug", LogLog.DEBUG_KEY);
+ }
+
+ /**
+ * Check value of CONFIG_DEBUG_KEY.
+ * @deprecated since constant is deprecated
+ */
+ public void testConfigDebugKey() {
+ assertEquals("log4j.configDebug", LogLog.CONFIG_DEBUG_KEY);
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]