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 org.apache.log4j.spi.LoggerRepository; 020import java.net.URL; 021 022/** 023 Implemented by classes capable of configuring log4j using a URL. 024 025 @since 1.0 026 @author Anders Kristensen 027 */ 028public interface Configurator { 029 030 /** 031 Special level value signifying inherited behaviour. The current 032 value of this string constant is <b>inherited</b>. {@link #NULL} 033 is a synonym. */ 034 public static final String INHERITED = "inherited"; 035 036 /** 037 Special level signifying inherited behaviour, same as {@link 038 #INHERITED}. The current value of this string constant is 039 <b>null</b>. */ 040 public static final String NULL = "null"; 041 042 /** 043 Interpret a resource pointed by a URL and set up log4j accordingly. 044 045 The configuration is done relative to the <code>hierarchy</code> 046 parameter. 047 048 @param url The URL to parse 049 @param repository The hierarchy to operation upon. 050 */ 051 void doConfigure(URL url, LoggerRepository repository); 052}