亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? loggingevent.java

?? log4j的源碼
?? JAVA
字號:
/* * Copyright 1999-2005 The Apache Software Foundation. *  * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *  *      http://www.apache.org/licenses/LICENSE-2.0 *  * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.log4j.spi;import org.apache.log4j.*;import org.apache.log4j.helpers.LogLog;import org.apache.log4j.helpers.Loader;import java.lang.reflect.Method;import java.io.ObjectOutputStream;import java.io.ObjectInputStream;import java.util.Hashtable;// Contributors:   Nelson Minar <nelson@monkey.org>//                 Wolf Siberski//                 Anders Kristensen <akristensen@dynamicsoft.com>/**   The internal representation of logging events. When an affirmative   decision is made to log then a <code>LoggingEvent</code> instance   is created. This instance is passed around to the different log4j   components.   <p>This class is of concern to those wishing to extend log4j.   @author Ceki G&uuml;lc&uuml;   @author James P. Cakalic   @since 0.8.2 */public class LoggingEvent implements java.io.Serializable {  private static long startTime = System.currentTimeMillis();  /** Fully qualified name of the calling category class. */  transient public final String fqnOfCategoryClass;  /**    * The category of the logging event. This field is not serialized   * for performance reasons.   *   * <p>It is set by the LoggingEvent constructor or set by a remote   * entity after deserialization.   *    * @deprecated This field will be marked as private or be completely   * removed in future releases. Please do not use it.   * */  transient private Category logger;  /**    * <p>The category (logger) name.   *      * @deprecated This field will be marked as private in future   * releases. Please do not access it directly. Use the {@link   * #getLoggerName} method instead.   * */  final public String categoryName;  /**    * Level of logging event. Level cannot be serializable because it   * is a flyweight.  Due to its special seralization it cannot be   * declared final either.   *      * <p> This field should not be accessed directly. You shoud use the   * {@link #getLevel} method instead.   *   * @deprecated This field will be marked as private in future   * releases. Please do not access it directly. Use the {@link   * #getLevel} method instead.   * */  transient public Priority level;  /** The nested diagnostic context (NDC) of logging event. */  private String ndc;  /** The mapped diagnostic context (MDC) of logging event. */  private Hashtable mdcCopy;  /** Have we tried to do an NDC lookup? If we did, there is no need   *  to do it again.  Note that its value is always false when   *  serialized. Thus, a receiving SocketNode will never use it's own   *  (incorrect) NDC. See also writeObject method. */  private boolean ndcLookupRequired = true;  /** Have we tried to do an MDC lookup? If we did, there is no need   *  to do it again.  Note that its value is always false when   *  serialized. See also the getMDC and getMDCCopy methods.  */  private boolean mdcCopyLookupRequired = true;  /** The application supplied message of logging event. */  transient private Object message;  /** The application supplied message rendered through the log4j      objet rendering mechanism.*/  private String renderedMessage;  /** The name of thread in which this logging event was generated. */  private String threadName;  /** This      variable contains information about this event's throwable  */  private ThrowableInformation throwableInfo;  /** The number of milliseconds elapsed from 1/1/1970 until logging event      was created. */  public final long timeStamp;  /** Location information for the caller. */  private LocationInfo locationInfo;  // Serialization  static final long serialVersionUID = -868428216207166145L;  static final Integer[] PARAM_ARRAY = new Integer[1];  static final String TO_LEVEL = "toLevel";  static final Class[] TO_LEVEL_PARAMS = new Class[] {int.class};  static final Hashtable methodCache = new Hashtable(3); // use a tiny table  /**     Instantiate a LoggingEvent from the supplied parameters.     <p>Except {@link #timeStamp} all the other fields of     <code>LoggingEvent</code> are filled when actually needed.     <p>     @param logger The logger generating this event.     @param level The level of this event.     @param message  The message of this event.     @param throwable The throwable of this event.  */  public LoggingEvent(String fqnOfCategoryClass, Category logger,		      Priority level, Object message, Throwable throwable) {    this.fqnOfCategoryClass = fqnOfCategoryClass;    this.logger = logger;    this.categoryName = logger.getName();    this.level = level;    this.message = message;    if(throwable != null) {      this.throwableInfo = new ThrowableInformation(throwable);    }    timeStamp = System.currentTimeMillis();  }  /**     Instantiate a LoggingEvent from the supplied parameters.     <p>Except {@link #timeStamp} all the other fields of     <code>LoggingEvent</code> are filled when actually needed.     <p>     @param logger The logger generating this event.     @param timeStamp the timestamp of this logging event     @param level The level of this event.     @param message  The message of this event.     @param throwable The throwable of this event.  */  public LoggingEvent(String fqnOfCategoryClass, Category logger,		      long timeStamp, Priority level, Object message,		      Throwable throwable) {    this.fqnOfCategoryClass = fqnOfCategoryClass;    this.logger = logger;    this.categoryName = logger.getName();    this.level = level;    this.message = message;    if(throwable != null) {      this.throwableInfo = new ThrowableInformation(throwable);    }    this.timeStamp = timeStamp;  }  /**     Set the location information for this logging event. The collected     information is cached for future use.   */  public LocationInfo getLocationInformation() {    if(locationInfo == null) {      locationInfo = new LocationInfo(new Throwable(), fqnOfCategoryClass);    }    return locationInfo;  }  /**   * Return the level of this event. Use this form instead of directly   * accessing the <code>level</code> field.  */  public Level getLevel() {    return (Level) level;  }  /**   * Return the name of the logger. Use this form instead of directly   * accessing the <code>categoryName</code> field.     */  public String getLoggerName() {    return categoryName;  }  /**     Return the message for this logging event.     <p>Before serialization, the returned object is the message     passed by the user to generate the logging event. After     serialization, the returned value equals the String form of the     message possibly after object rendering.     @since 1.1 */  public  Object getMessage() {    if(message != null) {      return message;    } else {      return getRenderedMessage();    }  }  /**   * This method returns the NDC for this event. It will return the   * correct content even if the event was generated in a different   * thread or even on a different machine. The {@link NDC#get} method   * should <em>never</em> be called directly.  */  public  String getNDC() {    if(ndcLookupRequired) {      ndcLookupRequired = false;      ndc = NDC.get();    }    return ndc;  }  /**      Returns the the context corresponding to the <code>key</code>      parameter. If there is a local MDC copy, possibly because we are      in a logging server or running inside AsyncAppender, then we      search for the key in MDC copy, if a value is found it is      returned. Otherwise, if the search in MDC copy returns a null      result, then the current thread's <code>MDC</code> is used.            <p>Note that <em>both</em> the local MDC copy and the current      thread's MDC are searched.  */  public  Object getMDC(String key) {    Object r;    // Note the mdcCopy is used if it exists. Otherwise we use the MDC    // that is associated with the thread.    if(mdcCopy != null) {      r = mdcCopy.get(key);      if(r != null) {        return r;      }    }    return MDC.get(key);  }  /**     Obtain a copy of this thread's MDC prior to serialization or     asynchronous logging.    */  public  void getMDCCopy() {    if(mdcCopyLookupRequired) {      mdcCopyLookupRequired = false;      // the clone call is required for asynchronous logging.      // See also bug #5932.      Hashtable t = (Hashtable) MDC.getContext();      if(t != null) {	mdcCopy = (Hashtable) t.clone();      }    }  }  public  String getRenderedMessage() {     if(renderedMessage == null && message != null) {       if(message instanceof String)	 renderedMessage = (String) message;       else {	 LoggerRepository repository = logger.getLoggerRepository();	 if(repository instanceof RendererSupport) {	   RendererSupport rs = (RendererSupport) repository;	   renderedMessage= rs.getRendererMap().findAndRender(message);	 } else {	   renderedMessage = message.toString();	 }       }     }     return renderedMessage;  }  /**     Returns the time when the application started, in milliseconds     elapsed since 01.01.1970.  */  public static long getStartTime() {    return startTime;  }  public  String getThreadName() {    if(threadName == null)      threadName = (Thread.currentThread()).getName();    return threadName;  }  /**     Returns the throwable information contained within this     event. May be <code>null</code> if there is no such information.     <p>Note that the {@link Throwable} object contained within a     {@link ThrowableInformation} does not survive serialization.     @since 1.1 */  public  ThrowableInformation getThrowableInformation() {    return throwableInfo;  }  /**     Return this event's throwable's string[] representaion.  */  public  String[] getThrowableStrRep() {    if(throwableInfo ==  null)      return null;    else      return throwableInfo.getThrowableStrRep();  }  private  void readLevel(ObjectInputStream ois)                      throws java.io.IOException, ClassNotFoundException {    int p = ois.readInt();    try {      String className = (String) ois.readObject();      if(className == null) {	level = Level.toLevel(p);      } else {	Method m = (Method) methodCache.get(className);	if(m == null) {	  Class clazz = Loader.loadClass(className);	  // Note that we use Class.getDeclaredMethod instead of	  // Class.getMethod. This assumes that the Level subclass	  // implements the toLevel(int) method which is a	  // requirement. Actually, it does not make sense for Level	  // subclasses NOT to implement this method. Also note that	  // only Level can be subclassed and not Priority.	  m = clazz.getDeclaredMethod(TO_LEVEL, TO_LEVEL_PARAMS);	  methodCache.put(className, m);	}	PARAM_ARRAY[0] = new Integer(p);	level = (Level) m.invoke(null,  PARAM_ARRAY);      }    } catch(Exception e) {	LogLog.warn("Level deserialization failed, reverting to default.", e);	level = Level.toLevel(p);    }  }  private void readObject(ObjectInputStream ois)                        throws java.io.IOException, ClassNotFoundException {    ois.defaultReadObject();    readLevel(ois);    // Make sure that no location info is available to Layouts    if(locationInfo == null)      locationInfo = new LocationInfo(null, null);  }  private  void writeObject(ObjectOutputStream oos) throws java.io.IOException {    // Aside from returning the current thread name the wgetThreadName    // method sets the threadName variable.    this.getThreadName();    // This sets the renders the message in case it wasn't up to now.    this.getRenderedMessage();    // This call has a side effect of setting this.ndc and    // setting ndcLookupRequired to false if not already false.    this.getNDC();    // This call has a side effect of setting this.mdcCopy and    // setting mdcLookupRequired to false if not already false.    this.getMDCCopy();    // This sets the throwable sting representation of the event throwable.    this.getThrowableStrRep();    oos.defaultWriteObject();    // serialize this event's level    writeLevel(oos);  }  private  void writeLevel(ObjectOutputStream oos) throws java.io.IOException {    oos.writeInt(level.toInt());    Class clazz = level.getClass();    if(clazz == Level.class) {      oos.writeObject(null);    } else {      // writing directly the Class object would be nicer, except that      // serialized a Class object can not be read back by JDK      // 1.1.x. We have to resort to this hack instead.      oos.writeObject(clazz.getName());    }  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美成人一区| 国产一区二区精品在线观看| 亚洲午夜免费电影| 亚洲成年人网站在线观看| 天天操天天色综合| 久草这里只有精品视频| 美女国产一区二区三区| 高清视频一区二区| 久久国产精品99精品国产| 国产麻豆精品95视频| av资源网一区| 欧美性生交片4| 久久人人爽人人爽| 亚洲国产精品久久人人爱| 亚洲永久精品大片| 国产成人综合在线观看| 欧美午夜精品电影| 久久久久久久综合狠狠综合| 亚洲精品免费在线| 男人的天堂久久精品| 99精品视频在线观看| 26uuu国产日韩综合| 亚洲成人福利片| 91丨九色丨蝌蚪丨老版| 精品福利一二区| 亚洲成av人片一区二区梦乃| 成人精品视频一区二区三区 | 大陆成人av片| 日韩一区二区在线看| 亚洲男人天堂av网| av中文字幕亚洲| 久久久蜜桃精品| 免费人成黄页网站在线一区二区| 一本大道综合伊人精品热热 | www.在线欧美| 欧美精品第一页| 一区二区三区欧美视频| 成人听书哪个软件好| 这里只有精品免费| 亚洲va欧美va国产va天堂影院| 99久久精品情趣| 国产精品久久久久久久久免费相片| 久久丁香综合五月国产三级网站| www.在线欧美| 欧美精品v国产精品v日韩精品| 中文字幕欧美一| 男人的天堂久久精品| 粉嫩在线一区二区三区视频| 欧美一区二区三区在线| 欧美极品xxx| 午夜精品久久久久久久| 99久久99久久精品免费看蜜桃| 日韩精品一区二区三区蜜臀| 九色综合狠狠综合久久| 亚洲精品一区二区三区99| 亚洲国产精品久久一线不卡| 欧美日韩国产高清一区| 五月天精品一区二区三区| 6080日韩午夜伦伦午夜伦| 日韩 欧美一区二区三区| 91精品国产综合久久久蜜臀粉嫩| 日韩成人av影视| 欧美一级二级三级乱码| 免费成人av资源网| 久久天堂av综合合色蜜桃网| 国产美女一区二区| 国产精品久久久久毛片软件| 91美女在线观看| 一区二区三区中文字幕精品精品| 日本高清不卡在线观看| 国产精品美女久久久久久久久| 99久久伊人网影院| 亚洲高清视频中文字幕| 欧美一区二区三区在线视频| 国产99久久久国产精品潘金| 亚洲激情男女视频| 欧美一区二区网站| 加勒比av一区二区| 久久婷婷色综合| 日本道在线观看一区二区| 国产精品免费久久久久| av午夜精品一区二区三区| 亚洲国产精品久久艾草纯爱| 欧美成人三级电影在线| 大尺度一区二区| 一区二区三区高清在线| 欧美成人艳星乳罩| 色综合久久天天| 亚洲成av人片www| 国产免费观看久久| 欧美精品久久99久久在免费线| 国产一区二区网址| 亚洲永久免费av| 日韩一区二区三区观看| 99久久精品免费看国产| 老司机精品视频在线| 亚洲美女淫视频| 69堂国产成人免费视频| 波多野结衣视频一区| 人人超碰91尤物精品国产| 一区视频在线播放| 欧美刺激午夜性久久久久久久| 91丝袜美腿高跟国产极品老师| 麻豆精品国产传媒mv男同| 亚洲日本欧美天堂| 中文字幕欧美激情| 欧美本精品男人aⅴ天堂| 欧美中文字幕不卡| 97精品电影院| 日韩av一区二区三区四区| 中文字幕第一区综合| 91麻豆国产在线观看| 激情欧美日韩一区二区| 亚洲一区二区黄色| 亚洲狼人国产精品| 国产精品久久久久久久久免费丝袜 | 福利视频网站一区二区三区| 日本午夜精品视频在线观看| 亚洲女同ⅹxx女同tv| 国产婷婷色一区二区三区四区| 日韩三级电影网址| 欧美高清激情brazzers| 欧美午夜宅男影院| 色88888久久久久久影院野外| 国产91丝袜在线播放| 激情综合色播激情啊| 全国精品久久少妇| 欧美a级一区二区| 日本欧美韩国一区三区| 偷拍与自拍一区| 天天综合天天做天天综合| 亚洲风情在线资源站| 一级特黄大欧美久久久| 一区二区三区在线视频免费 | 91年精品国产| 色婷婷综合视频在线观看| av电影天堂一区二区在线| 岛国精品在线观看| 91在线看国产| 91一区在线观看| 色偷偷久久一区二区三区| 成人性视频网站| 国产成人99久久亚洲综合精品| 天天综合色天天| 麻豆视频一区二区| 国内外精品视频| 国产成人精品1024| 99精品久久免费看蜜臀剧情介绍| 国产乱子轮精品视频| 麻豆成人av在线| 久久www免费人成看片高清| 国内一区二区视频| 9久草视频在线视频精品| 一本色道久久综合亚洲91| 欧美日韩国产精品成人| 欧美电影免费观看高清完整版在线观看| 欧美一级黄色录像| 国产精品国产a| 亚洲午夜久久久久中文字幕久| 蜜桃视频在线一区| 国产精品一区专区| 国产99久久精品| 99国产精品久久久久久久久久| 91看片淫黄大片一级| 欧美日韩国产片| 国产亚洲精品精华液| 一区二区在线观看免费视频播放| 午夜精品一区二区三区三上悠亚| 国产毛片精品视频| 97久久超碰国产精品| 日韩免费视频线观看| 中文字幕免费不卡在线| 丝袜国产日韩另类美女| 国产成人99久久亚洲综合精品| 欧美色图在线观看| 国产午夜一区二区三区| 国产精品午夜在线| 亚洲一二三区在线观看| 亚洲福利电影网| 日本欧美大码aⅴ在线播放| 不卡一区二区三区四区| 99久久精品免费看国产免费软件| 精品美女一区二区| 亚洲精品国产精华液| 国产精品18久久久| 91精品国产色综合久久久蜜香臀| 国产精品美女久久福利网站| 日本免费新一区视频| 91丨九色丨尤物| 国产欧美日韩在线看| 日本不卡视频一二三区| 91在线精品一区二区三区| 久久网站最新地址| 免费精品视频最新在线| 国产91在线观看| 这里只有精品免费| 亚洲自拍都市欧美小说| 99精品一区二区三区| 国产精品乱人伦一区二区| 精久久久久久久久久久|