01: /*
02: * Copyright 2001-2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: * Set the ALLOW_FLAWED_CONTEXT feature on the LogFactoryImpl object
26: * associated with this class' classloader.
27: * <p>
28: * Don't forget to set the context classloader to whatever it will be
29: * when an instance of this class is actually created <i>before</i> calling
30: * this method!
31: */
32: public static void setAllowFlawedContext(String state) {
33: LogFactory f = LogFactory.getFactory();
34: f.setAttribute(LogFactoryImpl.ALLOW_FLAWED_CONTEXT_PROPERTY,
35: state);
36: }
37:
38: public UserClass() {
39: Log log = LogFactory.getLog(LoadTestCase.class);
40: }
41:
42: }
|