/ ************************************************** ***************** * Final Upgrade Japan: $ Date: 2005/11/16 05:48:47 $ [$ Revision: 1.11 $] * Final Update: $ Author: lhj_kk $ * copyright (c) 2004-2006 Nnn ATA Corporation, all rights reserved. **************************************************** ********************************************************************** / package jp.co. **. ** .core.logging;
Import jp.co. **. **. Core.Constants.baseconstant;
Import org.apache.log4j.category; import org.apache.log4j.propertyConfigurator;
/ ** * グ グ マネ ジャ ジャ ラ
* Function は は 通 通 り
*
/ ** * ro Corning イ nn su ta nn su の acquired * @param thisclass grades Te Oligo an have の ki ー * @return Category ka Te Oligo an have * / public static synchronized Category getInstance (String thisclass) {// 20051103 UC.UP-1 Lu Yu correction STA if (! SERVERLOG.equals (thisclass) {thisclass = serverlog;} f (category == null) {category = category.getInstance (thisclass);} // 20051103 UC.UP-1 Lu Yu corrected end return category;}}
2.
Package jp.co.nec.inf.frw.log;
Import java.net.URL;
Import jp.co.nec.inf.frw.com.frwcst;
Import org.apache.log4j.logger; import org.apache.log4j.propertyConfigurator; import org.apache.log4j.xml.domconfigurator;
public class FrwAdapterLog implements FrwLog {public static final String XML_FILE_EXTENSION = ".xml"; static {// log4j initialization URL url = FrwAdapterLog.class.getClassLoader () getResource (FrwCst.LOG4JFILE_LOCATION);. if (FrwCst.LOG4JFILE_LOCATION.toLowerCase ( ) .endsWith (XML_FILE_EXTENSION)) {DOMConfigurator.configure (url);} else {PropertyConfigurator.configure (url);} // if (url = null) {// DOMConfigurator.configure (url); //}! else { // Domconfigurator.configure (System.GetProperty ("log4j.configuration", "log4j.xml")); //}} / ** * ギ ギ ギ グ 本 * / private org.apache.log4j.logger logger;
/ ** * コ コ ト ト ラ ク タ * @Param CLS グ グ を 出 る ク ス * / protected furtapterlog (CLOGGER = Logger.getlogger (CLS);
/ ** * Designation れ れ ラ ス ギ ギ ギ グ 初 化 化. * @Param CLS グ グ グ 出 ク ラ * / public static frwlog getinstance (class cls) {frwadapterlog wrapper = new frwadapterlog (cls); return wrapper;} / ** * グ ク ク ス ス き き き き き き ラ ラ ラ ラ ラ* * @Param cls ro Corning Kuraray su * / public void resetLogger (Class cls) {logger = org.apache.log4j.Logger.getLogger (cls);} public void debug (String message, Throwable cause) {logger.debug (message, Cause);
Public void error (String Message, throwable cause) {logger.error (message, cause);}
Public void info (string message, throwable cause) {logger.info (message, cause);
Public void Warn (String Message, throwable cause) {logger.warn (message, cause);
Public void debug (string message) {logger.debug (message);
Public void info (string message) {logger.info (message);
Public void warn (string message) {logger.warn (message);
Public void error (String message) {logger.error (message);
}