View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements. See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache license, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License. You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the license for the specific language governing permissions and
15   * limitations under the license.
16   */
17  package org.apache.log4j;
18  
19  import org.apache.log4j.spi.LoggerRepository;
20  
21  import java.io.InputStream;
22  import java.net.URL;
23  import java.util.Properties;
24  
25  /**
26   *
27   * @since 0.8.1
28   */
29  public class PropertyConfigurator {
30  
31      public void doConfigure(String configFileName, LoggerRepository hierarchy) {
32  
33      }
34  
35      public static void configure(String configFileName) {
36      }
37  
38      /**
39       Read configuration options from url <code>configURL</code>.
40  
41       @since 0.8.2
42       */
43      public static void configure(URL configURL) {
44      }
45  
46      /**
47       Reads configuration options from an InputStream.
48  
49       @since 1.2.17
50       */
51      public static void configure(InputStream inputStream) {
52      }
53  
54  
55      /**
56       Read configuration options from <code>properties</code>.
57  
58       See {@link #doConfigure(String, LoggerRepository)} for the expected format.
59       */
60      public static void configure(Properties properties) {
61      }
62  
63      /**
64       Like {@link #configureAndWatch(String, long)} except that the
65       default delay as defined by FileWatchdog.DEFAULT_DELAY is
66       used.
67  
68       @param configFilename A file in key=value format.
69  
70       */
71      public static void configureAndWatch(String configFilename) {
72      }
73  
74  
75      /**
76       Read the configuration file <code>configFilename</code> if it
77       exists. Moreover, a thread will be created that will periodically
78       check if <code>configFilename</code> has been created or
79       modified. The period is determined by the <code>delay</code>
80       argument. If a change or file creation is detected, then
81       <code>configFilename</code> is read to configure log4j.
82  
83       @param configFilename A file in key=value format.
84       @param delay The delay in milliseconds to wait between each check.
85       */
86      public static void configureAndWatch(String configFilename, long delay) {
87      }
88  
89  
90      /**
91       Read configuration options from <code>properties</code>.
92  
93       See {@link #doConfigure(String, LoggerRepository)} for the expected format.
94       */
95      public void doConfigure(Properties properties, LoggerRepository hierarchy) {
96      }
97  
98      /**
99       * Read configuration options from an InputStream.
100      *
101      * @since 1.2.17
102      */
103     public void doConfigure(InputStream inputStream, LoggerRepository hierarchy) {
104     }
105 
106     /**
107      Read configuration options from url <code>configURL</code>.
108      */
109     public void doConfigure(java.net.URL configURL, LoggerRepository hierarchy) {
110     }
111 }