KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > util > LoggerFactory


1 /******************************************************************************
2  * The contents of this file are subject to the Compiere License Version 1.1
3  * ("License"); You may not use this file except in compliance with the License
4  * You may obtain a copy of the License at http://www.compiere.org/license.html
5  * Software distributed under the License is distributed on an "AS IS" basis,
6  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
7  * the specific language governing rights and limitations under the License.
8  * The Original Code is Compiere ERP & CRM Business Solution
9  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
10  * Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
11  * created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
12  * Contributor(s): ______________________________________.
13  *****************************************************************************/

14 package org.compiere.util;
15
16 /**
17  * Logger Factory for Compiere Logger
18  *
19  * @author Jorg Janke
20  * @version $Id: LoggerFactory.java,v 1.1 2003/10/04 03:55:46 jjanke Exp $
21  */

22 public class LoggerFactory implements org.apache.log4j.spi.LoggerFactory
23 {
24
25     /**
26      * Get the Factory
27      * @return factory
28      */

29     public static LoggerFactory get()
30     {
31         if (s_factory == null)
32             s_factory = new LoggerFactory();
33         return s_factory;
34     } // get
35

36     /** Factory */
37     private static LoggerFactory s_factory;
38
39     /*************************************************************************/
40
41     /**
42      * Constructor
43      */

44     private LoggerFactory()
45     {
46     } // LoggerFactory
47

48     /**
49      * Log Factory
50      * @param name
51      * @return
52      */

53     public org.apache.log4j.Logger makeNewLoggerInstance (String JavaDoc name)
54     {
55         return new org.compiere.util.Logger (name);
56     } // makeNewLoggerInstance
57

58 } // LoggerFactory
59
Popular Tags