[jboss-svn-commits] JBoss Common SVN: r3179 - jboss-logmanager/trunk/src/main/java/org/jboss/logmanager.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed May 20 16:08:33 EDT 2009


Author: david.lloyd at jboss.com
Date: 2009-05-20 16:08:33 -0400 (Wed, 20 May 2009)
New Revision: 3179

Modified:
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/LogContext.java
Log:
Get rid of stdio loggers notion, add null check

Modified: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/LogContext.java
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/LogContext.java	2009-05-20 20:07:46 UTC (rev 3178)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/LogContext.java	2009-05-20 20:08:33 UTC (rev 3179)
@@ -46,9 +46,6 @@
      */
     final Lock treeLock = new ReentrantLock(false);
 
-    private volatile Logger stdoutLogger;
-    private volatile Logger stderrLogger;
-
     LogContext() {
     }
 
@@ -120,6 +117,9 @@
      * @param newSelector the new selector.
      */
     public static void setLogContextSelector(LogContextSelector newSelector) {
+        if (newSelector == null) {
+            throw new NullPointerException("newSelector is null");
+        }
         final SecurityManager sm = System.getSecurityManager();
         if (sm != null) {
             sm.checkPermission(SET_CONTEXT_SELECTOR_PERMISSION);
@@ -133,40 +133,4 @@
             sm.checkPermission(CONTROL_PERMISSION);
         }
     }
-
-    /**
-     * Get the logger for standard output.
-     *
-     * @return the current logger, or {@code null} if none is configured
-     */
-    public Logger getStdoutLogger() {
-        return stdoutLogger;
-    }
-
-    /**
-     * Set the logger for standard output, or null to suppress for this context.
-     *
-     * @param stdoutLogger the new logger
-     */
-    public void setStdoutLogger(final Logger stdoutLogger) {
-        this.stdoutLogger = stdoutLogger;
-    }
-
-    /**
-     * Get the logger for standard error.
-     *
-     * @return the current logger, or {@code null} if none is configured
-     */
-    public Logger getStderrLogger() {
-        return stderrLogger;
-    }
-
-    /**
-     * Set the logger for standard error, or null to suppress for this context.
-     *
-     * @param stderrLogger the new logger
-     */
-    public void setStderrLogger(final Logger stderrLogger) {
-        this.stderrLogger = stderrLogger;
-    }
 }




More information about the jboss-svn-commits mailing list