001/*
002 * Copyright 2001-2004 The Apache Software Foundation.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.apache.log4j.spi;
018
019import java.net.URL;
020
021/**
022   Implemented by classes capable of configuring log4j using a URL.
023
024   @since 1.0
025   @author Anders Kristensen
026 */
027public interface Configurator {
028
029    /**
030       Special level value signifying inherited behaviour. The current
031       value of this string constant is <b>inherited</b>. {@link #NULL}
032       is a synonym.  */
033    public static final String INHERITED = "inherited";
034
035    /**
036       Special level signifying inherited behaviour, same as {@link
037       #INHERITED}. The current value of this string constant is
038       <b>null</b>. */
039    public static final String NULL = "null";
040
041    /**
042       Interpret a resource pointed by a URL and set up log4j accordingly.
043    
044       The configuration is done relative to the <code>hierarchy</code>
045       parameter.
046    
047       @param url The URL to parse
048       @param repository The hierarchy to operation upon.
049     */
050    void doConfigure(URL url, LoggerRepository repository);
051}