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 ca...@apache.org on 2006/01/18 18:50:05 UTC
svn commit: r370203 [1/2] - in /logging/sandbox/log4j/log4jMini/trunk: ./
src/java/org/apache/log4j/ src/java/org/apache/log4j/examples/
src/java/org/apache/log4j/helpers/ src/java/org/apache/log4j/spi/
src/java/org/apache/log4j/test/
Author: carnold
Date: Wed Jan 18 09:49:50 2006
New Revision: 370203
URL: http://svn.apache.org/viewcvs?rev=370203&view=rev
Log:
Bug 37843: Update license notices to ASL 2.0
Added:
logging/sandbox/log4j/log4jMini/trunk/LICENSE
logging/sandbox/log4j/log4jMini/trunk/NOTICE
Removed:
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Category.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/CategoryKey.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/StressCategory.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/RootCategory.java
Modified:
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Appender.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/AppenderSkeleton.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/FileAppender.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Hierarchy.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Layout.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Logger.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/NDC.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/PatternLayout.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Priority.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/PropertyConfigurator.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/ProvisionNode.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/WriterAppender.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/.cvsignore
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/Sort.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/SortAlgo.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/Trivial.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/FormattingInfo.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/LogLog.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/OptionConverter.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/PatternConverter.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/PatternParser.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/package.html
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/OptionHandler.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/RootLogger.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/test/ConfigurationFileParsing.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/test/Hello.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/test/Min.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/test/Shallow.java
Added: logging/sandbox/log4j/log4jMini/trunk/LICENSE
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/LICENSE?rev=370203&view=auto
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/LICENSE (added)
+++ logging/sandbox/log4j/log4jMini/trunk/LICENSE Wed Jan 18 09:49:50 2006
@@ -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 [yyyy] [name of copyright owner]
+
+ 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/sandbox/log4j/log4jMini/trunk/NOTICE
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/NOTICE?rev=370203&view=auto
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/NOTICE (added)
+++ logging/sandbox/log4j/log4jMini/trunk/NOTICE Wed Jan 18 09:49:50 2006
@@ -0,0 +1 @@
+This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Appender.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Appender.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Appender.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Appender.java Wed Jan 18 09:49:50 2006
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2003-2006 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;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/AppenderSkeleton.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/AppenderSkeleton.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/AppenderSkeleton.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/AppenderSkeleton.java Wed Jan 18 09:49:50 2006
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2003-2006 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 org.apache.log4j.Layout;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/FileAppender.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/FileAppender.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/FileAppender.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/FileAppender.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,18 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software
- * License version 1.1, a copy of which has been included with this
- * distribution in the LICENSE.APL file. */
+ * Copyright 2003-2006 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;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Hierarchy.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Hierarchy.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Hierarchy.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Hierarchy.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,18 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software
- * License version 1.1, a copy of which has been included with this
- * distribution in the LICENSE.txt file. */
+ * Copyright 2003-2006 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.
+ */
// WARNING This class MUST not have references to the Logger or
// WARNING RootLogger classes in its static initiliazation neither
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Layout.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Layout.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Layout.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Layout.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,18 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software
- * License version 1.1, a copy of which has been included with this
- * distribution in the LICENSE.txt file. */
+ * Copyright 2003-2006 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;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Logger.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Logger.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Logger.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Logger.java Wed Jan 18 09:49:50 2006
@@ -1,645 +1,656 @@
-/*
- * This software is published under the terms of the Apache Software
- * License version 1.1, a copy of which has been included with this
- * distribution in the LICENSE.txt file. */
-
-// Contibutors: Alex Blewitt <Al...@ioshq.com>
-// Markus Oestreicher <oe...@zurich.ibm.com>
-// Frank Hoering <fh...@zurich.ibm.com>
-// Nelson Minar <ne...@media.mit.edu>
-// Jim Cakalic <ji...@na.biomerieux.com>
-// Avy Sharell <as...@club-internet.fr>
-// Ciaran Treanor <ci...@xelector.com>
-// Jeff Turner <je...@socialchange.net.au>
-// Michael Horwitz <MH...@siemens.co.za>
-// Calvin Chan <ca...@hic.gov.au>
-// Aaron Greenhouse <aa...@cs.cmu.edu>
-// Beat Meier <bm...@infovia.com.ar>
-
-package org.apache.log4j;
-
-import org.apache.log4j.Priority;
-import org.apache.log4j.spi.RootLogger;
-import org.apache.log4j.spi.LoggingEvent;
-import org.apache.log4j.helpers.LogLog;
-
-import java.util.Enumeration;
-import java.util.Vector;
-import java.util.MissingResourceException;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.net.URL;
-import java.net.MalformedURLException;
-
-
-/**
- This is the central class in the log4j package. One of the
- distintive features of log4j are hierarchical loggers and their
- evaluation.
-
- <p>See the <a href="../../../../manual.html">user manual</a> for an
- introduction on this class.
-
- @author Ceki Gülcü
- @author Anders Kristensen
-* @author <a href="mailto:ralph.curtis@gabrielsoftware.com">Ralph Curtis</a>
-*/
-public class Logger {
- /**
- The hierarchy where loggers are attached to by default.
- */
- static
- public
- final Hierarchy defaultHierarchy = new Hierarchy(new
- RootLogger(Priority.DEBUG));
-
- /**
- The name of this Logger.
- */
- protected String name;
-
- /**
- The assigned priority of this Logger. The
- <code>priority</code> variable need not be assined a value in
- which case it is inherited form the hierarchy. */
- volatile protected Priority priority;
-
- /**
- The parent of this Logger. All loggers have at least one
- ancestor which is the root Logger. */
- volatile protected Logger parent;
-
- // Loggers need to know what Hierarchy they are in
- protected Hierarchy hierarchy;
-
- /** Array of appenders. */
- protected Vector appenderList;
-
- /** Additivity is set to true by default, that is children inherit
- the appenders of their ancestors by default. If this variable is
- set to <code>false</code> then the appenders found in the
- ancestors of this Logger are not used. However, the children
- of this Logger will inherit its appenders, unless the children
- have their additivity flag set to <code>false</code> too. See
- the user manual for more details. */
- protected boolean additive = true;
-
- /**
- This constructor created a new <code>Logger</code> instance and
- sets its name.
-
- <p>It is intended to be used by sub-classes only. You should not
- create Loggers directly.
-
- @param name The name of the Logger.
- */
- protected
- Logger(String name) {
- this.name = name;
- }
-
- /**
- Add <code>newAppender</code> to the list of appenders of this
- Logger instance.
-
- <p>If <code>newAppender</code> is already in the list of
- appenders, then it won't be added again.
- */
- synchronized
- public
- void addAppender(Appender newAppender) {
- // Null values for newAppender parameter are strictly forbidden.
- if(newAppender == null)
- return;
-
- if(appenderList == null) {
- appenderList = new Vector(1);
- }
- if(!appenderList.contains(newAppender))
- appenderList.addElement(newAppender);
- }
-
- public
- int appendLoopOnAppenders(LoggingEvent event) {
- int size = 0;
- Appender appender;
-
- if(appenderList != null) {
- size = appenderList.size();
- for(int i = 0; i < size; i++) {
- appender = (Appender) appenderList.elementAt(i);
- appender.doAppend(event);
- }
- }
- return size;
- }
-
- /**
- Call the appenders in the hierrachy starting at
- <code>this</code>. If no appenders could be found, emit a
- warning.
-
- <p>This method calls all the appenders inherited from the
- hierarchy circumventing any evaluation of whether to log or not
- to log the particular log request.
-
- @param event the event to log. */
- public
- void callAppenders(LoggingEvent event) {
- int writes = 0;
-
- for(Logger c = this; c != null; c=c.parent) {
- // Protected against simultaneous call to addAppender, removeAppender,...
- synchronized(c) {
- if(c.appenderList != null) {
- writes += c.appendLoopOnAppenders(event);
- }
- if(!c.additive) {
- break;
- }
- }
- }
- // No appenders in hierarchy, warn user only once.
- if(!hierarchy.emittedNoAppenderWarning && writes == 0) {
- LogLog.error("No appenders could be found for Logger (" +
- this.getName() + ").");
- LogLog.error("Please initialize the log4j system properly.");
- hierarchy.emittedNoAppenderWarning = true;
- }
- }
-
- /**
- Log a message object with the {@link Priority#DEBUG DEBUG} priority.
-
- <p>This method first checks if this Logger is <code>DEBUG</code>
- enabled by comparing the priority of this Logger with the {@link
- Priority#DEBUG DEBUG} priority. If this Logger is
- <code>DEBUG</code> enabled, then it invokes all the registered
- appenders in this Logger and also higher in the hierarchy
- depending on the value of the additivity flag.
-
- <p><b>WARNING</b> Note that passing a {@link Throwable} to this
- method will print the name of the <code>Throwable</code> but no
- stack trace. To print a stack trace use the {@link #debug(Object,
- Throwable)} form instead.
-
- @param message the message object to log. */
- public
- void debug(Object message) {
- if(hierarchy.enableInt > Priority.DEBUG_INT)
- return;
- if(Priority.DEBUG.isGreaterOrEqual(this.getChainedPriority())) {
- forcedLog(Priority.DEBUG, message, null);
- }
- }
-
-
- /**
- Log a message object with the <code>DEBUG</code> priority including
- the stack trace of the {@link Throwable} <code>t</code> passed as
- parameter.
-
- <p>See {@link #debug(Object)} form for more detailed information.
-
- @param message the message object to log.
- @param t the exception to log, including its stack trace. */
- public
- void debug(Object message, Throwable t) {
- if(hierarchy.enableInt > Priority.DEBUG_INT)
- return;
- if(Priority.DEBUG.isGreaterOrEqual(this.getChainedPriority()))
- forcedLog(Priority.DEBUG, message, t);
- }
-
- /**
- Log a message object with the {@link Priority#ERROR ERROR} priority.
-
- <p>This method first checks if this Logger is <code>ERROR</code>
- enabled by comparing the priority of this Logger with {@link
- Priority#ERROR ERROR} priority. If this Logger is
- <code>DEBUG</code> enabled, then it invokes all the registered
- appenders in this Logger and also higher in the hierarchy
- depending on the value of the additivity flag.
-
- <p><b>WARNING</b> Note that passing a {@link Throwable} to this
- method will print the name of the <code>Throwable</code> but no
- stack trace. To print a stack trace use the {@link #error(Object,
- Throwable)} form instead.
-
- @param message the message object to log */
- public
- void error(Object message) {
- if(hierarchy.enableInt > Priority.ERROR_INT)
- return;
- if(Priority.ERROR.isGreaterOrEqual(this.getChainedPriority()))
- forcedLog(Priority.ERROR, message, null);
- }
-
- /**
- Log a message object with the <code>ERROR</code> priority including
- the stack trace of the {@link Throwable} <code>t</code> passed as
- parameter.
-
- <p>See {@link #error(Object)} form for more detailed information.
-
- @param message the message object to log.
- @param t the exception to log, including its stack trace. */
- public
- void error(Object message, Throwable t) {
- if(hierarchy.enableInt > Priority.ERROR_INT)
- return;
- if(Priority.ERROR.isGreaterOrEqual(this.getChainedPriority()))
- forcedLog(Priority.ERROR, message, t);
-
- }
-
- /**
- Log a message object with the {@link Priority#FATAL FATAL} priority.
-
- <p>This method first checks if this Logger is <code>FATAL</code>
- enabled by comparing the priority of this Logger with {@link
- Priority#FATAL FATAL} priority. If this Logger is
- <code>DEBUG</code> enabled, then it invokes all the registered
- appenders in this Logger and also higher in the hierarchy
- depending on the value of the additivity flag.
-
- <p><b>WARNING</b> Note that passing a {@link Throwable} to this
- method will print the name of the Throwable but no stack trace. To
- print a stack trace use the {@link #fatal(Object, Throwable)} form
- instead.
-
- @param message the message object to log */
- public
- void fatal(Object message) {
- if(hierarchy.enableInt > Priority.FATAL_INT)
- return;
- if(Priority.FATAL.isGreaterOrEqual(this.getChainedPriority()))
- forcedLog(Priority.FATAL, message, null);
- }
-
- /**
- Log a message object with the <code>FATAL</code> priority including
- the stack trace of the {@link Throwable} <code>t</code> passed as
- parameter.
-
- <p>See {@link #fatal(Object)} for more detailed information.
-
- @param message the message object to log.
- @param t the exception to log, including its stack trace. */
- public
- void fatal(Object message, Throwable t) {
- if(hierarchy.enableInt > Priority.FATAL_INT)
- return;
- if(Priority.FATAL.isGreaterOrEqual(this.getChainedPriority()))
- forcedLog(Priority.FATAL, message, t);
- }
-
-
- /**
- This method creates a new logging event and logs the event
- without further checks. */
- protected
- void forcedLog(Priority priority, Object message, Throwable t) {
- callAppenders(new LoggingEvent(this, priority, message, t));
- }
-
-
- /**
- Get the additivity flag for this Logger instance.
- */
- public
- boolean getAdditivity() {
- return additive;
- }
-
-
- /**
- Starting from this Logger, search the Logger hierarchy for a
- non-null priority and return it. Otherwise, return the priority of the
- root Logger.
-
- <p>The Logger class is designed so that this method executes as
- quickly as possible.
- */
- public
- Priority getChainedPriority() {
- for(Logger c = this; c != null; c=c.parent) {
- if(c.priority != null)
- return c.priority;
- }
- return null; // If reached will cause an NullPointerException.
- }
-
- /**
- Return the the {@link Hierarchy} where this <code>Logger</code> instance is
- attached.
-
- @since 1.1 */
- public
- Hierarchy getHierarchy() {
- return hierarchy;
- }
-
-
- /**
- Retrieve a Logger with named as the <code>name</code>
- parameter. If the named Logger already exists, then the
- existing instance will be reutrned. Otherwise, a new instance is
- created.
-
- By default, Loggers do not have a set priority but inherit
- it from the hierarchy. This is one of the central features of
- log4j.
-
- @param name The name of the Logger to retrieve. */
- public
- static
- Logger getInstance(String name) {
- return defaultHierarchy.getInstance(name);
- }
-
- /**
- Shorthand for <code>getInstance(clazz.getName())</code>.
-
- @param clazz The name of <code>clazz</code> will be used as the
- name of the Logger to retrieve. See {@link
- #getInstance(String)} for more detailed information.
-
- @since 1.0 */
- public
- static
- Logger getInstance(Class clazz) {
- return getInstance(clazz.getName());
- }
-
- /**
- Return the Logger name. */
- public
- final
- String getName() {
- return name;
- }
-
- /**
- Returns the assigned {@link Priority}, if any, for this Logger.
-
- @return Priority - the assigned Priority, can be <code>null</code>.
- */
- final
- public
- Priority getPriority() {
- return this.priority;
- }
-
- /**
- Return the root of the default Logger hierrachy.
-
- <p>The root Logger is always instantiated and available. It's
- name is "root".
-
- <p>Nevertheless, calling {@link #getInstance
- Logger.getInstance("root")} does not retrieve the root Logger
- but a Logger just under root named "root".
-
- */
- final
- public
- static
- Logger getRoot() {
- return defaultHierarchy.getRoot();
- }
-
-
- /**
- Log a message object with the {@link Priority#INFO INFO} priority.
-
- <p>This method first checks if this Logger is <code>INFO</code>
- enabled by comparing the priority of this Logger with {@link
- Priority#INFO INFO} priority. If this Logger is
- <code>DEBUG</code> enabled, then it invokes all the registered
- appenders in this Logger and also higher in the hierarchy
- depending on the value of the additivity flag.
-
- <p><b>WARNING</b> Note that passing a {@link Throwable} to this
- method will print the name of the Throwable but no stack trace. To
- print a stack trace use the {@link #info(Object, Throwable)} form
- instead.
-
- @param message the message object to log */
- public
- void info(Object message) {
- if(hierarchy.enableInt > Priority.INFO_INT)
- return;
- if(Priority.INFO.isGreaterOrEqual(this.getChainedPriority()))
- forcedLog(Priority.INFO, message, null);
- }
-
- /**
- Log a message object with the <code>INFO</code> priority including
- the stack trace of the {@link Throwable} <code>t</code> passed as
- parameter.
-
- <p>See {@link #info(Object)} for more detailed information.
-
- @param message the message object to log.
- @param t the exception to log, including its stack trace. */
- public
- void info(Object message, Throwable t) {
- if(hierarchy.enableInt > Priority.INFO_INT)
- return;
- if(Priority.INFO.isGreaterOrEqual(this.getChainedPriority()))
- forcedLog(Priority.INFO, message, t);
- }
-
- /**
- * Check whether this Logger is enabled for the <code>DEBUG</code>
- * priority.
- *
- * <p> This function is intended to lessen the computational cost of
- * disabled log debug statements.
- *
- * <p> For some <code>cat</code> Logger object, when you write,
- * <pre>
- * cat.debug("This is entry number: " + i );
- * </pre>
- *
- * <p>You incur the cost constructing the message, concatenatiion in
- * this case, regardless of whether the message is logged or not.
- *
- * <p>If you are worried about speed, then you should write
- * <pre>
- * if(cat.isDebugEnabled()) {
- * cat.debug("This is entry number: " + i );
- * }
- * </pre>
- *
- * <p>This way you will not incur the cost of parameter
- * construction if debugging is disabled for <code>cat</code>. On
- * the other hand, if the <code>cat</code> is debug enabled, you
- * will incur the cost of evaluating whether the Logger is debug
- * enabled twice. Once in <code>isDebugEnabled</code> and once in
- * the <code>debug</code>. This is an insignificant overhead
- * since evaluating a Logger takes about 1%% of the time it
- * takes to actually log.
- *
- * @return boolean - <code>true</code> if this Logger is debug
- * enabled, <code>false</code> otherwise.
- * */
- public
- boolean isDebugEnabled() {
- if(hierarchy.enableInt > Priority.DEBUG_INT)
- return false;
- return Priority.DEBUG.isGreaterOrEqual(this.getChainedPriority());
- }
-
- /**
- Check whether this Logger is enabled for a given {@link
- Priority} passed as parameter.
-
- See also {@link #isDebugEnabled}.
-
- @return boolean True if this Logger is enabled for <code>priority</code>.
- */
- public
- boolean isEnabledFor(Priority priority) {
- if(hierarchy.enableInt > priority.level)
- return false;
- return priority.isGreaterOrEqual(this.getChainedPriority());
- }
-
- /**
- Check whether this Logger is enabled for the info priority.
- See also {@link #isDebugEnabled}.
-
- @return boolean - <code>true</code> if this Logger is enabled
- for priority info, <code>false</code> otherwise.
- */
- public
- boolean isInfoEnabled() {
- if(hierarchy.enableInt > Priority.INFO_INT)
- return false;
- return Priority.INFO.isGreaterOrEqual(this.getChainedPriority());
- }
-
-
-
- /**
- Remove all previously added appenders from this Logger
- instance.
-
- <p>This is useful when re-reading configuration information.
- */
- synchronized
- public
- void removeAllAppenders() {
- if(appenderList != null) {
- int len = appenderList.size();
- for(int i = 0; i < len; i++) {
- Appender a = (Appender) appenderList.elementAt(i);
- a.close();
- }
- appenderList.removeAllElements();
- appenderList = null;
- }
- }
-
- /**
- Remove the appender passed as parameter form the list of appenders.
-
- @since 0.8.2
- */
- synchronized
- public
- void removeAppender(Appender appender) {
- if(appender == null || appenderList == null)
- return;
- appenderList.removeElement(appender);
- }
-
- /**
- Remove the appender with the name passed as parameter form the
- list of appenders.
-
- @since 0.8.2 */
- synchronized
- public
- void removeAppender(String name) {
- if(name == null || appenderList == null) return;
- int size = appenderList.size();
- for(int i = 0; i < size; i++) {
- if(name.equals(((Appender)appenderList.elementAt(i)).getName())) {
- appenderList.removeElementAt(i);
- break;
- }
- }
- }
-
- /**
- Set the additivity flag for this Logger instance.
- @since 0.8.1
- */
- public
- void setAdditivity(boolean additive) {
- this.additive = additive;
- }
-
- /**
- Only the Hiearchy class can set the hiearchy of a
- Logger. Default package access is MANDATORY here. */
- final
- void setHierarchy(Hierarchy hierarchy) {
- this.hierarchy = hierarchy;
- }
-
- /**
- Set the priority of this Logger.
-
- <p>Null values are admitted.
- */
- public
- void setPriority(Priority priority) {
- this.priority = priority;
- }
-
- /**
- Log a message object with the {@link Priority#WARN WARN} priority.
-
- <p>This method first checks if this Logger is <code>WARN</code>
- enabled by comparing the priority of this Logger with {@link
- Priority#WARN WARN} priority. If this Logger is
- <code>DEBUG</code> enabled, then it invokes all the registered
- appenders in this Logger and also higher in the hierarchy
- depending on the value of the additivity flag.
-
- <p><b>WARNING</b> Note that passing a {@link Throwable} to this
- method will print the name of the Throwable but no stack trace. To
- print a stack trace use the {@link #warn(Object, Throwable)} form
- instead. <p>
-
- @param message the message object to log. */
- public
- void warn(Object message) {
- if(hierarchy.enableInt > Priority.WARN_INT)
- return;
-
- if(Priority.WARN.isGreaterOrEqual(this.getChainedPriority()))
- forcedLog(Priority.WARN, message, null);
- }
-
- /**
- Log a message with the <code>WARN</code> priority including the
- stack trace of the {@link Throwable} <code>t</code> passed as
- parameter.
-
- <p>See {@link #warn(Object)} for more detailed information.
-
- @param message the message object to log.
- @param t the exception to log, including its stack trace. */
- public
- void warn(Object message, Throwable t) {
- if(hierarchy.enableInt > Priority.WARN_INT)
- return;
- if(Priority.WARN.isGreaterOrEqual(this.getChainedPriority()))
- forcedLog(Priority.WARN, message, t);
- }
-}
+/*
+ * Copyright 2003-2006 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.
+ */
+
+// Contibutors: Alex Blewitt <Al...@ioshq.com>
+// Markus Oestreicher <oe...@zurich.ibm.com>
+// Frank Hoering <fh...@zurich.ibm.com>
+// Nelson Minar <ne...@media.mit.edu>
+// Jim Cakalic <ji...@na.biomerieux.com>
+// Avy Sharell <as...@club-internet.fr>
+// Ciaran Treanor <ci...@xelector.com>
+// Jeff Turner <je...@socialchange.net.au>
+// Michael Horwitz <MH...@siemens.co.za>
+// Calvin Chan <ca...@hic.gov.au>
+// Aaron Greenhouse <aa...@cs.cmu.edu>
+// Beat Meier <bm...@infovia.com.ar>
+
+package org.apache.log4j;
+
+import org.apache.log4j.Priority;
+import org.apache.log4j.spi.RootLogger;
+import org.apache.log4j.spi.LoggingEvent;
+import org.apache.log4j.helpers.LogLog;
+
+import java.util.Enumeration;
+import java.util.Vector;
+import java.util.MissingResourceException;
+import java.text.MessageFormat;
+import java.util.ResourceBundle;
+import java.net.URL;
+import java.net.MalformedURLException;
+
+
+/**
+ This is the central class in the log4j package. One of the
+ distintive features of log4j are hierarchical loggers and their
+ evaluation.
+
+ <p>See the <a href="../../../../manual.html">user manual</a> for an
+ introduction on this class.
+
+ @author Ceki Gülcü
+ @author Anders Kristensen
+* @author <a href="mailto:ralph.curtis@gabrielsoftware.com">Ralph Curtis</a>
+*/
+public class Logger {
+ /**
+ The hierarchy where loggers are attached to by default.
+ */
+ static
+ public
+ final Hierarchy defaultHierarchy = new Hierarchy(new
+ RootLogger(Priority.DEBUG));
+
+ /**
+ The name of this Logger.
+ */
+ protected String name;
+
+ /**
+ The assigned priority of this Logger. The
+ <code>priority</code> variable need not be assined a value in
+ which case it is inherited form the hierarchy. */
+ volatile protected Priority priority;
+
+ /**
+ The parent of this Logger. All loggers have at least one
+ ancestor which is the root Logger. */
+ volatile protected Logger parent;
+
+ // Loggers need to know what Hierarchy they are in
+ protected Hierarchy hierarchy;
+
+ /** Array of appenders. */
+ protected Vector appenderList;
+
+ /** Additivity is set to true by default, that is children inherit
+ the appenders of their ancestors by default. If this variable is
+ set to <code>false</code> then the appenders found in the
+ ancestors of this Logger are not used. However, the children
+ of this Logger will inherit its appenders, unless the children
+ have their additivity flag set to <code>false</code> too. See
+ the user manual for more details. */
+ protected boolean additive = true;
+
+ /**
+ This constructor created a new <code>Logger</code> instance and
+ sets its name.
+
+ <p>It is intended to be used by sub-classes only. You should not
+ create Loggers directly.
+
+ @param name The name of the Logger.
+ */
+ protected
+ Logger(String name) {
+ this.name = name;
+ }
+
+ /**
+ Add <code>newAppender</code> to the list of appenders of this
+ Logger instance.
+
+ <p>If <code>newAppender</code> is already in the list of
+ appenders, then it won't be added again.
+ */
+ synchronized
+ public
+ void addAppender(Appender newAppender) {
+ // Null values for newAppender parameter are strictly forbidden.
+ if(newAppender == null)
+ return;
+
+ if(appenderList == null) {
+ appenderList = new Vector(1);
+ }
+ if(!appenderList.contains(newAppender))
+ appenderList.addElement(newAppender);
+ }
+
+ public
+ int appendLoopOnAppenders(LoggingEvent event) {
+ int size = 0;
+ Appender appender;
+
+ if(appenderList != null) {
+ size = appenderList.size();
+ for(int i = 0; i < size; i++) {
+ appender = (Appender) appenderList.elementAt(i);
+ appender.doAppend(event);
+ }
+ }
+ return size;
+ }
+
+ /**
+ Call the appenders in the hierrachy starting at
+ <code>this</code>. If no appenders could be found, emit a
+ warning.
+
+ <p>This method calls all the appenders inherited from the
+ hierarchy circumventing any evaluation of whether to log or not
+ to log the particular log request.
+
+ @param event the event to log. */
+ public
+ void callAppenders(LoggingEvent event) {
+ int writes = 0;
+
+ for(Logger c = this; c != null; c=c.parent) {
+ // Protected against simultaneous call to addAppender, removeAppender,...
+ synchronized(c) {
+ if(c.appenderList != null) {
+ writes += c.appendLoopOnAppenders(event);
+ }
+ if(!c.additive) {
+ break;
+ }
+ }
+ }
+ // No appenders in hierarchy, warn user only once.
+ if(!hierarchy.emittedNoAppenderWarning && writes == 0) {
+ LogLog.error("No appenders could be found for Logger (" +
+ this.getName() + ").");
+ LogLog.error("Please initialize the log4j system properly.");
+ hierarchy.emittedNoAppenderWarning = true;
+ }
+ }
+
+ /**
+ Log a message object with the {@link Priority#DEBUG DEBUG} priority.
+
+ <p>This method first checks if this Logger is <code>DEBUG</code>
+ enabled by comparing the priority of this Logger with the {@link
+ Priority#DEBUG DEBUG} priority. If this Logger is
+ <code>DEBUG</code> enabled, then it invokes all the registered
+ appenders in this Logger and also higher in the hierarchy
+ depending on the value of the additivity flag.
+
+ <p><b>WARNING</b> Note that passing a {@link Throwable} to this
+ method will print the name of the <code>Throwable</code> but no
+ stack trace. To print a stack trace use the {@link #debug(Object,
+ Throwable)} form instead.
+
+ @param message the message object to log. */
+ public
+ void debug(Object message) {
+ if(hierarchy.enableInt > Priority.DEBUG_INT)
+ return;
+ if(Priority.DEBUG.isGreaterOrEqual(this.getChainedPriority())) {
+ forcedLog(Priority.DEBUG, message, null);
+ }
+ }
+
+
+ /**
+ Log a message object with the <code>DEBUG</code> priority including
+ the stack trace of the {@link Throwable} <code>t</code> passed as
+ parameter.
+
+ <p>See {@link #debug(Object)} form for more detailed information.
+
+ @param message the message object to log.
+ @param t the exception to log, including its stack trace. */
+ public
+ void debug(Object message, Throwable t) {
+ if(hierarchy.enableInt > Priority.DEBUG_INT)
+ return;
+ if(Priority.DEBUG.isGreaterOrEqual(this.getChainedPriority()))
+ forcedLog(Priority.DEBUG, message, t);
+ }
+
+ /**
+ Log a message object with the {@link Priority#ERROR ERROR} priority.
+
+ <p>This method first checks if this Logger is <code>ERROR</code>
+ enabled by comparing the priority of this Logger with {@link
+ Priority#ERROR ERROR} priority. If this Logger is
+ <code>DEBUG</code> enabled, then it invokes all the registered
+ appenders in this Logger and also higher in the hierarchy
+ depending on the value of the additivity flag.
+
+ <p><b>WARNING</b> Note that passing a {@link Throwable} to this
+ method will print the name of the <code>Throwable</code> but no
+ stack trace. To print a stack trace use the {@link #error(Object,
+ Throwable)} form instead.
+
+ @param message the message object to log */
+ public
+ void error(Object message) {
+ if(hierarchy.enableInt > Priority.ERROR_INT)
+ return;
+ if(Priority.ERROR.isGreaterOrEqual(this.getChainedPriority()))
+ forcedLog(Priority.ERROR, message, null);
+ }
+
+ /**
+ Log a message object with the <code>ERROR</code> priority including
+ the stack trace of the {@link Throwable} <code>t</code> passed as
+ parameter.
+
+ <p>See {@link #error(Object)} form for more detailed information.
+
+ @param message the message object to log.
+ @param t the exception to log, including its stack trace. */
+ public
+ void error(Object message, Throwable t) {
+ if(hierarchy.enableInt > Priority.ERROR_INT)
+ return;
+ if(Priority.ERROR.isGreaterOrEqual(this.getChainedPriority()))
+ forcedLog(Priority.ERROR, message, t);
+
+ }
+
+ /**
+ Log a message object with the {@link Priority#FATAL FATAL} priority.
+
+ <p>This method first checks if this Logger is <code>FATAL</code>
+ enabled by comparing the priority of this Logger with {@link
+ Priority#FATAL FATAL} priority. If this Logger is
+ <code>DEBUG</code> enabled, then it invokes all the registered
+ appenders in this Logger and also higher in the hierarchy
+ depending on the value of the additivity flag.
+
+ <p><b>WARNING</b> Note that passing a {@link Throwable} to this
+ method will print the name of the Throwable but no stack trace. To
+ print a stack trace use the {@link #fatal(Object, Throwable)} form
+ instead.
+
+ @param message the message object to log */
+ public
+ void fatal(Object message) {
+ if(hierarchy.enableInt > Priority.FATAL_INT)
+ return;
+ if(Priority.FATAL.isGreaterOrEqual(this.getChainedPriority()))
+ forcedLog(Priority.FATAL, message, null);
+ }
+
+ /**
+ Log a message object with the <code>FATAL</code> priority including
+ the stack trace of the {@link Throwable} <code>t</code> passed as
+ parameter.
+
+ <p>See {@link #fatal(Object)} for more detailed information.
+
+ @param message the message object to log.
+ @param t the exception to log, including its stack trace. */
+ public
+ void fatal(Object message, Throwable t) {
+ if(hierarchy.enableInt > Priority.FATAL_INT)
+ return;
+ if(Priority.FATAL.isGreaterOrEqual(this.getChainedPriority()))
+ forcedLog(Priority.FATAL, message, t);
+ }
+
+
+ /**
+ This method creates a new logging event and logs the event
+ without further checks. */
+ protected
+ void forcedLog(Priority priority, Object message, Throwable t) {
+ callAppenders(new LoggingEvent(this, priority, message, t));
+ }
+
+
+ /**
+ Get the additivity flag for this Logger instance.
+ */
+ public
+ boolean getAdditivity() {
+ return additive;
+ }
+
+
+ /**
+ Starting from this Logger, search the Logger hierarchy for a
+ non-null priority and return it. Otherwise, return the priority of the
+ root Logger.
+
+ <p>The Logger class is designed so that this method executes as
+ quickly as possible.
+ */
+ public
+ Priority getChainedPriority() {
+ for(Logger c = this; c != null; c=c.parent) {
+ if(c.priority != null)
+ return c.priority;
+ }
+ return null; // If reached will cause an NullPointerException.
+ }
+
+ /**
+ Return the the {@link Hierarchy} where this <code>Logger</code> instance is
+ attached.
+
+ @since 1.1 */
+ public
+ Hierarchy getHierarchy() {
+ return hierarchy;
+ }
+
+
+ /**
+ Retrieve a Logger with named as the <code>name</code>
+ parameter. If the named Logger already exists, then the
+ existing instance will be reutrned. Otherwise, a new instance is
+ created.
+
+ By default, Loggers do not have a set priority but inherit
+ it from the hierarchy. This is one of the central features of
+ log4j.
+
+ @param name The name of the Logger to retrieve. */
+ public
+ static
+ Logger getInstance(String name) {
+ return defaultHierarchy.getInstance(name);
+ }
+
+ /**
+ Shorthand for <code>getInstance(clazz.getName())</code>.
+
+ @param clazz The name of <code>clazz</code> will be used as the
+ name of the Logger to retrieve. See {@link
+ #getInstance(String)} for more detailed information.
+
+ @since 1.0 */
+ public
+ static
+ Logger getInstance(Class clazz) {
+ return getInstance(clazz.getName());
+ }
+
+ /**
+ Return the Logger name. */
+ public
+ final
+ String getName() {
+ return name;
+ }
+
+ /**
+ Returns the assigned {@link Priority}, if any, for this Logger.
+
+ @return Priority - the assigned Priority, can be <code>null</code>.
+ */
+ final
+ public
+ Priority getPriority() {
+ return this.priority;
+ }
+
+ /**
+ Return the root of the default Logger hierrachy.
+
+ <p>The root Logger is always instantiated and available. It's
+ name is "root".
+
+ <p>Nevertheless, calling {@link #getInstance
+ Logger.getInstance("root")} does not retrieve the root Logger
+ but a Logger just under root named "root".
+
+ */
+ final
+ public
+ static
+ Logger getRoot() {
+ return defaultHierarchy.getRoot();
+ }
+
+
+ /**
+ Log a message object with the {@link Priority#INFO INFO} priority.
+
+ <p>This method first checks if this Logger is <code>INFO</code>
+ enabled by comparing the priority of this Logger with {@link
+ Priority#INFO INFO} priority. If this Logger is
+ <code>DEBUG</code> enabled, then it invokes all the registered
+ appenders in this Logger and also higher in the hierarchy
+ depending on the value of the additivity flag.
+
+ <p><b>WARNING</b> Note that passing a {@link Throwable} to this
+ method will print the name of the Throwable but no stack trace. To
+ print a stack trace use the {@link #info(Object, Throwable)} form
+ instead.
+
+ @param message the message object to log */
+ public
+ void info(Object message) {
+ if(hierarchy.enableInt > Priority.INFO_INT)
+ return;
+ if(Priority.INFO.isGreaterOrEqual(this.getChainedPriority()))
+ forcedLog(Priority.INFO, message, null);
+ }
+
+ /**
+ Log a message object with the <code>INFO</code> priority including
+ the stack trace of the {@link Throwable} <code>t</code> passed as
+ parameter.
+
+ <p>See {@link #info(Object)} for more detailed information.
+
+ @param message the message object to log.
+ @param t the exception to log, including its stack trace. */
+ public
+ void info(Object message, Throwable t) {
+ if(hierarchy.enableInt > Priority.INFO_INT)
+ return;
+ if(Priority.INFO.isGreaterOrEqual(this.getChainedPriority()))
+ forcedLog(Priority.INFO, message, t);
+ }
+
+ /**
+ * Check whether this Logger is enabled for the <code>DEBUG</code>
+ * priority.
+ *
+ * <p> This function is intended to lessen the computational cost of
+ * disabled log debug statements.
+ *
+ * <p> For some <code>cat</code> Logger object, when you write,
+ * <pre>
+ * cat.debug("This is entry number: " + i );
+ * </pre>
+ *
+ * <p>You incur the cost constructing the message, concatenatiion in
+ * this case, regardless of whether the message is logged or not.
+ *
+ * <p>If you are worried about speed, then you should write
+ * <pre>
+ * if(cat.isDebugEnabled()) {
+ * cat.debug("This is entry number: " + i );
+ * }
+ * </pre>
+ *
+ * <p>This way you will not incur the cost of parameter
+ * construction if debugging is disabled for <code>cat</code>. On
+ * the other hand, if the <code>cat</code> is debug enabled, you
+ * will incur the cost of evaluating whether the Logger is debug
+ * enabled twice. Once in <code>isDebugEnabled</code> and once in
+ * the <code>debug</code>. This is an insignificant overhead
+ * since evaluating a Logger takes about 1%% of the time it
+ * takes to actually log.
+ *
+ * @return boolean - <code>true</code> if this Logger is debug
+ * enabled, <code>false</code> otherwise.
+ * */
+ public
+ boolean isDebugEnabled() {
+ if(hierarchy.enableInt > Priority.DEBUG_INT)
+ return false;
+ return Priority.DEBUG.isGreaterOrEqual(this.getChainedPriority());
+ }
+
+ /**
+ Check whether this Logger is enabled for a given {@link
+ Priority} passed as parameter.
+
+ See also {@link #isDebugEnabled}.
+
+ @return boolean True if this Logger is enabled for <code>priority</code>.
+ */
+ public
+ boolean isEnabledFor(Priority priority) {
+ if(hierarchy.enableInt > priority.level)
+ return false;
+ return priority.isGreaterOrEqual(this.getChainedPriority());
+ }
+
+ /**
+ Check whether this Logger is enabled for the info priority.
+ See also {@link #isDebugEnabled}.
+
+ @return boolean - <code>true</code> if this Logger is enabled
+ for priority info, <code>false</code> otherwise.
+ */
+ public
+ boolean isInfoEnabled() {
+ if(hierarchy.enableInt > Priority.INFO_INT)
+ return false;
+ return Priority.INFO.isGreaterOrEqual(this.getChainedPriority());
+ }
+
+
+
+ /**
+ Remove all previously added appenders from this Logger
+ instance.
+
+ <p>This is useful when re-reading configuration information.
+ */
+ synchronized
+ public
+ void removeAllAppenders() {
+ if(appenderList != null) {
+ int len = appenderList.size();
+ for(int i = 0; i < len; i++) {
+ Appender a = (Appender) appenderList.elementAt(i);
+ a.close();
+ }
+ appenderList.removeAllElements();
+ appenderList = null;
+ }
+ }
+
+ /**
+ Remove the appender passed as parameter form the list of appenders.
+
+ @since 0.8.2
+ */
+ synchronized
+ public
+ void removeAppender(Appender appender) {
+ if(appender == null || appenderList == null)
+ return;
+ appenderList.removeElement(appender);
+ }
+
+ /**
+ Remove the appender with the name passed as parameter form the
+ list of appenders.
+
+ @since 0.8.2 */
+ synchronized
+ public
+ void removeAppender(String name) {
+ if(name == null || appenderList == null) return;
+ int size = appenderList.size();
+ for(int i = 0; i < size; i++) {
+ if(name.equals(((Appender)appenderList.elementAt(i)).getName())) {
+ appenderList.removeElementAt(i);
+ break;
+ }
+ }
+ }
+
+ /**
+ Set the additivity flag for this Logger instance.
+ @since 0.8.1
+ */
+ public
+ void setAdditivity(boolean additive) {
+ this.additive = additive;
+ }
+
+ /**
+ Only the Hiearchy class can set the hiearchy of a
+ Logger. Default package access is MANDATORY here. */
+ final
+ void setHierarchy(Hierarchy hierarchy) {
+ this.hierarchy = hierarchy;
+ }
+
+ /**
+ Set the priority of this Logger.
+
+ <p>Null values are admitted.
+ */
+ public
+ void setPriority(Priority priority) {
+ this.priority = priority;
+ }
+
+ /**
+ Log a message object with the {@link Priority#WARN WARN} priority.
+
+ <p>This method first checks if this Logger is <code>WARN</code>
+ enabled by comparing the priority of this Logger with {@link
+ Priority#WARN WARN} priority. If this Logger is
+ <code>DEBUG</code> enabled, then it invokes all the registered
+ appenders in this Logger and also higher in the hierarchy
+ depending on the value of the additivity flag.
+
+ <p><b>WARNING</b> Note that passing a {@link Throwable} to this
+ method will print the name of the Throwable but no stack trace. To
+ print a stack trace use the {@link #warn(Object, Throwable)} form
+ instead. <p>
+
+ @param message the message object to log. */
+ public
+ void warn(Object message) {
+ if(hierarchy.enableInt > Priority.WARN_INT)
+ return;
+
+ if(Priority.WARN.isGreaterOrEqual(this.getChainedPriority()))
+ forcedLog(Priority.WARN, message, null);
+ }
+
+ /**
+ Log a message with the <code>WARN</code> priority including the
+ stack trace of the {@link Throwable} <code>t</code> passed as
+ parameter.
+
+ <p>See {@link #warn(Object)} for more detailed information.
+
+ @param message the message object to log.
+ @param t the exception to log, including its stack trace. */
+ public
+ void warn(Object message, Throwable t) {
+ if(hierarchy.enableInt > Priority.WARN_INT)
+ return;
+ if(Priority.WARN.isGreaterOrEqual(this.getChainedPriority()))
+ forcedLog(Priority.WARN, message, t);
+ }
+}
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/NDC.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/NDC.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/NDC.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/NDC.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,17 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
+ * Copyright 2003-2006 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.
*/
// Contributors: Dan Milstein
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/PatternLayout.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/PatternLayout.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/PatternLayout.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/PatternLayout.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,17 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE file.
+ * Copyright 2003-2006 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;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Priority.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Priority.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Priority.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Priority.java Wed Jan 18 09:49:50 2006
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2003-2006 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;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/PropertyConfigurator.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/PropertyConfigurator.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/PropertyConfigurator.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/PropertyConfigurator.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,18 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software
- * License version 1.1, a copy of which has been included with this
- * distribution in the LICENSE.APL file. */
+ * Copyright 2003-2006 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.
+ */
// Contibutors: "Luke Blanshard" <Lu...@quiq.com>
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/ProvisionNode.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/ProvisionNode.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/ProvisionNode.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/ProvisionNode.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,18 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software
- * License version 1.1, a copy of which has been included with this
- * distribution in the LICENSE.txt file. */
+ * Copyright 2003-2006 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;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/WriterAppender.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/WriterAppender.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/WriterAppender.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/WriterAppender.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,18 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software
- * License version 1.1, a copy of which has been included with this
- * distribution in the LICENSE.txt file. */
+ * Copyright 2003-2006 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;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/.cvsignore
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/.cvsignore?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/.cvsignore (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/.cvsignore Wed Jan 18 09:49:50 2006
@@ -1 +1,16 @@
+/*
+ * Copyright 2004 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.
+ */
doc-files
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/Sort.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/Sort.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/Sort.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/Sort.java Wed Jan 18 09:49:50 2006
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2003-2006 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.examples;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/SortAlgo.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/SortAlgo.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/SortAlgo.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/SortAlgo.java Wed Jan 18 09:49:50 2006
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2003-2006 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.examples;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/Trivial.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/Trivial.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/Trivial.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/examples/Trivial.java Wed Jan 18 09:49:50 2006
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2003-2006 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.examples;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/FormattingInfo.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/FormattingInfo.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/FormattingInfo.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/FormattingInfo.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,17 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.APL file.
+ * Copyright 2003-2006 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;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/LogLog.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/LogLog.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/LogLog.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/LogLog.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,17 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
+ * Copyright 2003-2006 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;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/OptionConverter.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/OptionConverter.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/OptionConverter.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/OptionConverter.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,18 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software
- * License version 1.1, a copy of which has been included with this
- * distribution in the LICENSE.txt file. */
+ * Copyright 2003-2006 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;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/PatternConverter.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/PatternConverter.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/PatternConverter.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/PatternConverter.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,17 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.APL file.
+ * Copyright 2003-2006 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;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/PatternParser.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/PatternParser.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/PatternParser.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/helpers/PatternParser.java Wed Jan 18 09:49:50 2006
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2003-2006 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 org.apache.log4j.helpers.LogLog;
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/package.html
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/package.html?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/package.html (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/package.html Wed Jan 18 09:49:50 2006
@@ -1,3 +1,18 @@
+<!--
+ * Copyright 2003-2006 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.
+-->
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title></title>
Modified: logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java
URL: http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java?rev=370203&r1=370202&r2=370203&view=diff
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java (original)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java Wed Jan 18 09:49:50 2006
@@ -1,9 +1,18 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software
- * License version 1.1, a copy of which has been included with this
- * distribution in the LICENSE.txt file. */
+ * Copyright 2003-2006 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.spi;
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org