[jboss-svn-commits] JBoss Common SVN: r3331 - in jboss-logmanager/trunk/src/main/java/org/jboss/logmanager: errormanager and 2 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Jul 3 16:25:33 EDT 2009


Author: david.lloyd at jboss.com
Date: 2009-07-03 16:25:33 -0400 (Fri, 03 Jul 2009)
New Revision: 3331

Added:
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/ExtFormatter.java
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/ExtHandler.java
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/errormanager/
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/errormanager/OnlyOnceErrorManager.java
Removed:
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/formatters/ExtFormatter.java
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/ExtHandler.java
Modified:
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/formatters/MultistepFormatter.java
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/AsyncHandler.java
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/AutoFlushingHandler.java
   jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/WriterHandler.java
Log:
Unify sub-handler support; minor reorg

Copied: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/ExtFormatter.java (from rev 3330, jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/formatters/ExtFormatter.java)
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/ExtFormatter.java	                        (rev 0)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/ExtFormatter.java	2009-07-03 20:25:33 UTC (rev 3331)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logmanager;
+
+import org.jboss.logmanager.ExtLogRecord;
+
+import java.util.logging.Formatter;
+import java.util.logging.LogRecord;
+
+/**
+ * A formatter which handles {@link org.jboss.logmanager.ExtLogRecord ExtLogRecord} instances.
+ */
+public abstract class ExtFormatter extends Formatter {
+
+    private static final String LOGGER_CLASS_NAME = org.jboss.logmanager.Logger.class.getName();
+
+    /** {@inheritDoc} */
+    public final String format(final LogRecord record) {
+        return format((record instanceof ExtLogRecord) ? (ExtLogRecord) record : new ExtLogRecord(record, LOGGER_CLASS_NAME));
+    }
+
+    /**
+     * Format a message using an extended log record.
+     *
+     * @param extLogRecord the log record
+     * @return the formatted message
+     */
+    public abstract String format(final ExtLogRecord extLogRecord);
+}

Copied: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/ExtHandler.java (from rev 3330, jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/ExtHandler.java)
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/ExtHandler.java	                        (rev 0)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/ExtHandler.java	2009-07-03 20:25:33 UTC (rev 3331)
@@ -0,0 +1,132 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logmanager;
+
+import java.util.logging.Handler;
+import java.util.logging.LogRecord;
+import java.util.logging.LoggingPermission;
+
+import java.io.Flushable;
+import java.security.Permission;
+import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
+
+/**
+ * An extended logger handler.  Use this class as a base class for log handlers which require {@code ExtLogRecord}
+ * instances.
+ */
+public abstract class ExtHandler extends Handler implements Flushable {
+
+    private static final String LOGGER_CLASS_NAME = org.jboss.logmanager.Logger.class.getName();
+    private static final Permission CONTROL_PERMISSION = new LoggingPermission("control", null);
+
+    /**
+     * The sub-handlers for this handler.  May only be updated using the {@link #handlersUpdater} atomic updater.  The array
+     * instance should not be modified (treat as immutable).
+     */
+    @SuppressWarnings({ "UnusedDeclaration" })
+    protected volatile Handler[] handlers;
+
+    /**
+     * The atomic updater for the {@link #handlers} field.
+     */
+    protected static final AtomicArray<ExtHandler, Handler> handlersUpdater = AtomicArray.create(AtomicReferenceFieldUpdater.newUpdater(ExtHandler.class, Handler[].class, "handlers"), Handler.class);
+
+    /** {@inheritDoc} */
+    public final void publish(final LogRecord record) {
+        publish((record instanceof ExtLogRecord) ? (ExtLogRecord) record : new ExtLogRecord(record, LOGGER_CLASS_NAME));
+    }
+
+    /**
+     * Publish an {@code ExtLogRecord}.
+     * <p/>
+     * The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.
+     * <p/>
+     * The {@code ExtHandler} is responsible for formatting the message, when and if necessary. The formatting should
+     * include localization.
+     *
+     * @param record the log record to publish
+     */
+    public abstract void publish(final ExtLogRecord record);
+
+    /**
+     * Add a sub-handler to this handler.  Some handler types do not utilize sub-handlers.
+     *
+     * @param handler the handler to add
+     * @throws SecurityException if a security manager exists and if the caller does not have {@code LoggingPermission(control)}
+     */
+    public void addHandler(Handler handler) throws SecurityException {
+        LogContext.checkAccess();
+        if (handler == null) {
+            throw new NullPointerException("handler is null");
+        }
+        handlersUpdater.add(this, handler);
+    }
+
+    /**
+     * Remove a sub-handler from this handler.  Some handler types do not utilize sub-handlers.
+     *
+     * @param handler the handler to remove
+     * @throws SecurityException if a security manager exists and if the caller does not have {@code LoggingPermission(control)}
+     */
+    public void removeHandler(Handler handler) throws SecurityException {
+        LogContext.checkAccess();
+        if (handler == null) {
+            return;
+        }
+        handlersUpdater.remove(this, handler, true);
+    }
+
+    /**
+     * Get a copy of the sub-handlers array.  Since the returned value is a copy, it may be freely modified.
+     *
+     * @return a copy of the sub-handlers array
+     */
+    public Handler[] getHandlers() {
+        final Handler[] handlers = this.handlers;
+        return handlers.length > 0 ? handlers.clone() : handlers;
+    }
+
+    /**
+     * A convenience method to atomically get and clear all handlers.
+     *
+     * @throws SecurityException if a security manager exists and if the caller does not have {@code LoggingPermission(control)}
+     */
+    public Handler[] clearHandlers() throws SecurityException {
+        LogContext.checkAccess();
+        final Handler[] handlers = this.handlers;
+        handlersUpdater.clear(this);
+        return handlers.length > 0 ? handlers.clone() : handlers;
+    }
+
+    /**
+     * Check access.
+     *
+     * @throws SecurityException if a security manager is installed and the caller does not have the {@code "control" LoggingPermission}
+     */
+    protected static void checkAccess() throws SecurityException {
+        final SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkPermission(CONTROL_PERMISSION);
+        }
+    }
+}

Added: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/errormanager/OnlyOnceErrorManager.java
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/errormanager/OnlyOnceErrorManager.java	                        (rev 0)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/errormanager/OnlyOnceErrorManager.java	2009-07-03 20:25:33 UTC (rev 3331)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logmanager.errormanager;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.io.PrintStream;
+
+import java.util.logging.ErrorManager;
+
+/**
+ * An error manager which runs only once and writes a complete formatted error to {@code System.err}.  Caches
+ * an early {@code System.err} in case it is replaced.
+ */
+public final class OnlyOnceErrorManager extends ErrorManager {
+    private static final PrintStream ps = System.err;
+
+    private final AtomicBoolean called = new AtomicBoolean();
+
+    /** {@inheritDoc} */
+    public void error(final String msg, final Exception ex, final int code) {
+        if (called.getAndSet(true)) {
+            return;
+        }
+        final String codeStr;
+        switch (code) {
+            case CLOSE_FAILURE: codeStr = "CLOSE_FAILURE"; break;
+            case FLUSH_FAILURE: codeStr = "FLUSH_FAILURE"; break;
+            case FORMAT_FAILURE: codeStr = "FORMAT_FAILURE"; break;
+            case GENERIC_FAILURE: codeStr = "GENERIC_FAILURE"; break;
+            case OPEN_FAILURE: codeStr = "OPEN_FAILURE"; break;
+            case WRITE_FAILURE: codeStr = "WRITE_FAILURE"; break;
+            default: codeStr = "INVALID (" + code + ")"; break;
+        }
+        ps.printf("LogManager error of type %s: %s\n", codeStr, msg);
+        if (ex != null) {
+            ex.printStackTrace(ps);
+        }
+    }
+}

Deleted: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/formatters/ExtFormatter.java
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/formatters/ExtFormatter.java	2009-07-03 04:41:57 UTC (rev 3330)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/formatters/ExtFormatter.java	2009-07-03 20:25:33 UTC (rev 3331)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.logmanager.formatters;
-
-import org.jboss.logmanager.ExtLogRecord;
-
-import java.util.logging.Formatter;
-import java.util.logging.LogRecord;
-
-/**
- * A formatter which handles {@link org.jboss.logmanager.ExtLogRecord ExtLogRecord} instances.
- */
-public abstract class ExtFormatter extends Formatter {
-
-    private static final String LOGGER_CLASS_NAME = org.jboss.logmanager.Logger.class.getName();
-
-    /** {@inheritDoc} */
-    public final String format(final LogRecord record) {
-        return format((record instanceof ExtLogRecord) ? (ExtLogRecord) record : new ExtLogRecord(record, LOGGER_CLASS_NAME));
-    }
-
-    /**
-     * Format a message using an extended log record.
-     *
-     * @param extLogRecord the log record
-     * @return the formatted message
-     */
-    public abstract String format(final ExtLogRecord extLogRecord);
-}

Modified: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/formatters/MultistepFormatter.java
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/formatters/MultistepFormatter.java	2009-07-03 04:41:57 UTC (rev 3330)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/formatters/MultistepFormatter.java	2009-07-03 20:25:33 UTC (rev 3331)
@@ -23,6 +23,7 @@
 package org.jboss.logmanager.formatters;
 
 import org.jboss.logmanager.ExtLogRecord;
+import org.jboss.logmanager.ExtFormatter;
 import static java.lang.Math.max;
 
 /**

Modified: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/AsyncHandler.java
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/AsyncHandler.java	2009-07-03 04:41:57 UTC (rev 3330)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/AsyncHandler.java	2009-07-03 20:25:33 UTC (rev 3331)
@@ -23,7 +23,7 @@
 package org.jboss.logmanager.handlers;
 
 import org.jboss.logmanager.ExtLogRecord;
-import java.util.concurrent.CopyOnWriteArrayList;
+import org.jboss.logmanager.ExtHandler;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.Executors;
 import java.util.Queue;
@@ -37,7 +37,6 @@
  */
 public class AsyncHandler extends ExtHandler {
 
-    private final CopyOnWriteArrayList<Handler> handlers = new CopyOnWriteArrayList<Handler>();
     private final ThreadFactory threadFactory;
     private final Queue<ExtLogRecord> recordQueue;
     private final AsyncThread asyncThread = new AsyncThread();
@@ -83,35 +82,6 @@
         this(DEFAULT_QUEUE_LENGTH);
     }
 
-    /**
-     * Add a sub-handler to publish events to.
-     *
-     * @param handler the sub-handler
-     */
-    public void addHandler(final Handler handler) {
-        checkAccess();
-        synchronized (recordQueue) {
-            if (closed) {
-                throw new IllegalStateException("Handler is closed");
-            }
-            handlers.add(handler);
-        }
-    }
-
-    /**
-     * Remove a sub-handler.
-     *
-     * @param handler the sub-handler
-     */
-    public void removeHandler(final Handler handler) {
-        checkAccess();
-        synchronized (recordQueue) {
-            if (! closed) {
-                handlers.remove(handler);
-            }
-        }
-    }
-
     /** {@inheritDoc} */
     public void publish(final ExtLogRecord record) {
         final Queue<ExtLogRecord> recordQueue = this.recordQueue;
@@ -161,7 +131,7 @@
         checkAccess();
         closed = true;
         asyncThread.interrupt();
-        handlers.clear();
+        clearHandlers();
     }
 
     private final class AsyncThread implements Runnable {
@@ -177,7 +147,7 @@
         public void run() {
             thread = Thread.currentThread();
             final Queue<ExtLogRecord> recordQueue = AsyncHandler.this.recordQueue;
-            final CopyOnWriteArrayList<Handler> handlers = AsyncHandler.this.handlers;
+            final Handler[] handlers = AsyncHandler.this.handlers;
 
             boolean intr = false;
             try {

Modified: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/AutoFlushingHandler.java
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/AutoFlushingHandler.java	2009-07-03 04:41:57 UTC (rev 3330)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/AutoFlushingHandler.java	2009-07-03 20:25:33 UTC (rev 3331)
@@ -22,88 +22,35 @@
 
 package org.jboss.logmanager.handlers;
 
+import org.jboss.logmanager.ExtHandler;
+import org.jboss.logmanager.ExtLogRecord;
+
 import java.util.logging.Handler;
-import java.util.logging.LogRecord;
-import java.util.logging.Formatter;
-import java.util.logging.Filter;
-import java.util.logging.ErrorManager;
-import java.util.logging.Level;
 
 /**
- * A handler which wraps another handler, forcing a flush after each successful message publication.
+ * A handler which wraps other handlers, forcing a flush after each successful message publication.
  */
-public class AutoFlushingHandler extends Handler {
-    private final Handler delegate;
+public class AutoFlushingHandler extends ExtHandler {
 
     /**
      * Construct a new instance.
-     *
-     * @param delegate the handler to delegate to
      */
-    public AutoFlushingHandler(final Handler delegate) {
-        this.delegate = delegate;
+    public AutoFlushingHandler() {
     }
 
     /** {@inheritDoc} */
-    public void publish(final LogRecord record) {
-        final Handler delegate = this.delegate;
-        delegate.publish(record);
-        delegate.flush();
+    public void publish(final ExtLogRecord record) {
+        for (Handler handler : handlers) {
+            handler.publish(record);
+            handler.flush();
+        }
     }
 
-    /**
-     * Not supported.
-     *
-     * @param newFormatter ignored
-     * @throws UnsupportedOperationException always
-     */
-    public void setFormatter(final Formatter newFormatter) throws UnsupportedOperationException {
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * Not supported.
-     *
-     * @param encoding ignored
-     * @throws UnsupportedOperationException always
-     */
-    public void setEncoding(final String encoding) throws UnsupportedOperationException {
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * Not supported.
-     *
-     * @param newFilter ignored
-     * @throws UnsupportedOperationException always
-     */
-    public void setFilter(final Filter newFilter) throws UnsupportedOperationException {
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * Not supported.
-     *
-     * @param em ignored
-     * @throws UnsupportedOperationException always
-     */
-    public void setErrorManager(final ErrorManager em) throws UnsupportedOperationException{
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * Not supported.
-     *
-     * @param newLevel ignored
-     * @throws UnsupportedOperationException always
-     */
-    public void setLevel(final Level newLevel) throws UnsupportedOperationException {
-        throw new UnsupportedOperationException();
-    }
-
     /** {@inheritDoc} */
     public void flush() {
-        delegate.flush();
+        for (Handler handler : handlers) {
+            handler.flush();
+        }
     }
 
     /** {@inheritDoc}  This implementation does nothing. */

Deleted: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/ExtHandler.java
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/ExtHandler.java	2009-07-03 04:41:57 UTC (rev 3330)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/ExtHandler.java	2009-07-03 20:25:33 UTC (rev 3331)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.logmanager.handlers;
-
-import org.jboss.logmanager.ExtLogRecord;
-
-import java.util.logging.Handler;
-import java.util.logging.LogRecord;
-import java.util.logging.LoggingPermission;
-
-import java.io.Flushable;
-import java.security.Permission;
-
-/**
- * An extended logger handler.  Use this class as a base class for log handlers which require {@code ExtLogRecord}
- * instances.
- */
-public abstract class ExtHandler extends Handler implements Flushable {
-
-    private static final String LOGGER_CLASS_NAME = org.jboss.logmanager.Logger.class.getName();
-    private static final Permission CONTROL_PERMISSION = new LoggingPermission("control", null);
-
-    /** {@inheritDoc} */
-    public final void publish(final LogRecord record) {
-        publish((record instanceof ExtLogRecord) ? (ExtLogRecord) record : new ExtLogRecord(record, LOGGER_CLASS_NAME));
-    }
-
-    /**
-     * Publish an {@code ExtLogRecord}.
-     * <p/>
-     * The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.
-     * <p/>
-     * The {@code ExtHandler} is responsible for formatting the message, when and if necessary. The formatting should
-     * include localization.
-     *
-     * @param record the log record to publish
-     */
-    public abstract void publish(final ExtLogRecord record);
-
-    /**
-     * Check access.
-     *
-     * @throws SecurityException if a security manager is installed and the caller does not have the {@code "control" LoggingPermission}
-     */
-    protected static void checkAccess() throws SecurityException {
-        final SecurityManager sm = System.getSecurityManager();
-        if (sm != null) {
-            sm.checkPermission(CONTROL_PERMISSION);
-        }
-    }
-}

Modified: jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/WriterHandler.java
===================================================================
--- jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/WriterHandler.java	2009-07-03 04:41:57 UTC (rev 3330)
+++ jboss-logmanager/trunk/src/main/java/org/jboss/logmanager/handlers/WriterHandler.java	2009-07-03 20:25:33 UTC (rev 3331)
@@ -31,6 +31,7 @@
 import java.util.logging.Formatter;
 
 import org.jboss.logmanager.ExtLogRecord;
+import org.jboss.logmanager.ExtHandler;
 
 /**
  * A handler which writes to any {@code Writer}.




More information about the jboss-svn-commits mailing list