/*
 * 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.io.InputStream;
import java.io.IOException;
import java.net.URL;

/**
 * A configuration locator which looks for a {@code logging.properties} file in the class path, allowing the location
 * to be overridden via a URL specified in the {@code logging.configuration} system property.
 */
public final class DefaultConfigurationLocator implements ConfigurationLocator {

    /** {@inheritDoc} */
    public InputStream findConfiguration() throws IOException {
        final String propLoc = System.getProperty("logging.configuration");
        if (propLoc != null) try {
            return new URL(propLoc).openStream();
        } catch (IOException e) {
            System.err.printf("Unable to read the logging configuration from '%s' (%s)\n", propLoc, e);
        }
        final ClassLoader tccl = Thread.currentThread().getContextClassLoader();
        if (tccl != null) try {
            return tccl.getResourceAsStream("logging.properties");
        } catch (Exception e) {
        }
        return getClass().getResourceAsStream("logging.properties");
    }
}

@@ -1960,22 +1960,42 @@
         
-return
+final InputStream stream =
  tccl.ge
@@ -2031,24 +2031,71 @@
 operties%22);%0A
+            if (stream != null) return stream;%0A
         %7D ca

Fix prob where logging.properties can only be foudn on the TCCL