Author: carnold
Date: Thu Dec 1 21:21:04 2005
New Revision: 351601
URL: http://svn.apache.org/viewcvs?rev=351601&view=rev
Log:
Bug 29719: log4jMini does not build
Added:
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Logger.java
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/RootLogger.java
Added:
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=351601&view=auto
==============================================================================
--- logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Logger.java
(added)
+++ logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/Logger.java
Thu Dec 1 21:21:04 2005
@@ -0,0 +1,18 @@
+/*
+ *
+ */
+package org.apache.log4j;
+
+
+/**
+ * @author ewan.harrow
+ */
+public class Logger extends Category {
+
+ /**
+ *
+ */
+ public Logger(String name) {
+ super(name);
+ }
+}
Added:
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/RootLogger.java
URL:
http://svn.apache.org/viewcvs/logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/RootLogger.java?rev=351601&view=auto
==============================================================================
---
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/RootLogger.java
(added)
+++
logging/sandbox/log4j/log4jMini/trunk/src/java/org/apache/log4j/spi/RootLogger.java
Thu Dec 1 21:21:04 2005
@@ -0,0 +1,58 @@
+
+package org.apache.log4j.spi;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.apache.log4j.helpers.LogLog;
+
+
+/**
+ RootLogger sits at the top of the category hierachy. It is a
+ regular category except that it provides several guarantees.
+
+ <p>First, it cannot be assigned a <code>null</code>
+ priority. Second, since root category cannot have a parent, the
+ [EMAIL PROTECTED] #getChainedPriority} method always returns the value of
the
+ priority field without walking the hierarchy.
+
+
+ */
+final public class RootLogger extends Logger {
+
+ /**
+ The root logger names itself as "root". However, the root
+ category cannot be retrieved by name.
+ */
+ public
+ RootLogger(Priority priority) {
+ super("root");
+ setPriority(priority);
+ }
+
+
+ /**
+ Return the assigned priority value without walking the category
+ hierarchy.
+ */
+ final
+ public
+ Priority getChainedPriority() {
+ return priority;
+ }
+
+ /**
+ Setting a null value to the priority of the root category may have
catastrophic
+ results. We prevent this here.
+
+ @since 0.8.3 */
+ final
+ public
+ void setPriority(Priority priority) {
+ if(priority == null) {
+ LogLog.error("null priority disallowed", new Throwable());
+ }
+ else {
+ this.priority = priority;
+ }
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]