1 /*
2 * Copyright 2001-2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.apache.commons.logging;
18
19 import org.apache.commons.logging.LogFactory;
20 import org.apache.commons.logging.impl.LogFactoryImpl;
21
22 public class UserClass {
23
24
25 /***
26 * Set the ALLOW_FLAWED_CONTEXT feature on the LogFactoryImpl object
27 * associated with this class' classloader.
28 * <p>
29 * Don't forget to set the context classloader to whatever it will be
30 * when an instance of this class is actually created <i>before</i> calling
31 * this method!
32 */
33 public static void setAllowFlawedContext(String state) {
34 LogFactory f = LogFactory.getFactory();
35 f.setAttribute(LogFactoryImpl.ALLOW_FLAWED_CONTEXT_PROPERTY, state);
36 }
37
38 public UserClass() {
39 Log log = LogFactory.getLog(LoadTestCase.class);
40 }
41
42 }