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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? logrecord.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.lf5;import java.io.IOException;import java.io.PrintWriter;import java.io.StringWriter;/** * LogRecord.  A LogRecord encapsulates the details of your desired log * request. * * @author Michael J. Sikorsky * @author Robert Shaw */// Contributed by ThoughtWorks Inc.public abstract class LogRecord implements java.io.Serializable {  //--------------------------------------------------------------------------  //   Constants:  //--------------------------------------------------------------------------  //--------------------------------------------------------------------------  //   Protected Variables:  //--------------------------------------------------------------------------  protected static long _seqCount = 0;  protected LogLevel _level;  protected String _message;  protected long _sequenceNumber;  protected long _millis;  protected String _category;  protected String _thread;  protected String _thrownStackTrace;  protected Throwable _thrown;  protected String _ndc;  protected String _location;  //--------------------------------------------------------------------------  //   Private Variables:  //--------------------------------------------------------------------------  //--------------------------------------------------------------------------  //   Constructors:  //--------------------------------------------------------------------------  public LogRecord() {    super();    _millis = System.currentTimeMillis();    _category = "Debug";    _message = "";    _level = LogLevel.INFO;    _sequenceNumber = getNextId();    _thread = Thread.currentThread().toString();    _ndc = "";    _location = "";  }  //--------------------------------------------------------------------------  //   Public Methods:  //--------------------------------------------------------------------------  /**   * Get the level of this LogRecord.   *   * @return The LogLevel of this record.   * @see #setLevel(LogLevel)   * @see LogLevel   */  public LogLevel getLevel() {    return (_level);  }  /**   * Set the level of this LogRecord.   *   * @param level The LogLevel for this record.   * @see #getLevel()   * @see LogLevel   */  public void setLevel(LogLevel level) {    _level = level;  }  /**   * Abstract method. Must be overridden to indicate what log level   * to show in red.   */  public abstract boolean isSevereLevel();  /**   * @return true if getThrown().toString() is a non-empty string.   */  public boolean hasThrown() {    Throwable thrown = getThrown();    if (thrown == null) {      return false;    }    String thrownString = thrown.toString();    return thrownString != null && thrownString.trim().length() != 0;  }  /**   * @return true if isSevereLevel() or hasThrown() returns true.   */  public boolean isFatal() {    return isSevereLevel() || hasThrown();  }  /**   * Get the category asscociated with this LogRecord.  For a more detailed   * description of what a category is see setCategory().   *   * @return The category of this record.   * @see #setCategory(String)   */  public String getCategory() {    return (_category);  }  /**   * Set the category associated with this LogRecord. A category represents   * a hierarchical dot (".") separated namespace for messages.   * The definition of a category is application specific, but a common convention   * is as follows:   *   * <p>   * When logging messages   * for a particluar class you can use its class name:   * com.thoughtworks.framework.servlet.ServletServiceBroker.<br><br>   * Futhermore, to log a message for a particular method in a class   * add the method name:   * com.thoughtworks.framework.servlet.ServletServiceBroker.init().   * </p>   *   * @param category The category for this record.   * @see #getCategory()   */  public void setCategory(String category) {    _category = category;  }  /**   * Get the message asscociated with this LogRecord.   *   * @return The message of this record.   * @see #setMessage(String)   */  public String getMessage() {    return (_message);  }  /**   * Set the message associated with this LogRecord.   *   * @param message The message for this record.   * @see #getMessage()   */  public void setMessage(String message) {    _message = message;  }  /**   * Get the sequence number associated with this LogRecord.  Sequence numbers   * are generally assigned when a LogRecord is constructed.  Sequence numbers   * start at 0 and increase with each newly constructed LogRocord.   *   * @return The sequence number of this record.   * @see #setSequenceNumber(long)   */  public long getSequenceNumber() {    return (_sequenceNumber);  }  /**   * Set the sequence number assocsiated with this LogRecord.  A sequence number   * will automatically be assigned to evey newly constructed LogRecord, however,   * this method can override the value.   *   * @param number The sequence number.   * @see #getSequenceNumber()   */  public void setSequenceNumber(long number) {    _sequenceNumber = number;  }  /**   * Get the event time of this record in milliseconds from 1970.   * When a LogRecord is constructed the event time is set but may be   * overridden by calling setMillis();   *   * @return The event time of this record in milliseconds from 1970.   * @see #setMillis(long)   */  public long getMillis() {    return _millis;  }  /**   * Set the event time of this record.  When a LogRecord is constructed   * the event time is set but may be overridden by calling this method.   *   * @param millis The time in milliseconds from 1970.   * @see #getMillis()   */  public void setMillis(long millis) {    _millis = millis;  }  /**   * Get the thread description asscociated with this LogRecord.  When a   * LogRecord is constructed, the thread description is set by calling:   * Thread.currentThread().toString().  You may supply a thread description   * of your own by calling the setThreadDescription(String) method.   *   * @return The thread description of this record.   * @see #setThreadDescription(String)   */  public String getThreadDescription() {    return (_thread);  }  /**   * Set the thread description associated with this LogRecord.  When a   * LogRecord is constructed, the thread description is set by calling:   * Thread.currentThread().toString().  You may supply a thread description   * of your own by calling this method.   *   * @param threadDescription The description of the thread for this record.   * @see #getThreadDescription()   */  public void setThreadDescription(String threadDescription) {    _thread = threadDescription;  }  /**   * Get the stack trace in a String-based format for the associated Throwable   * of this LogRecord.  The stack trace in a String-based format is set   * when the setThrown(Throwable) method is called.   *   * <p>   * Why do we need this method considering that we   * have the getThrown() and setThrown() methods?   * A Throwable object may not be serializable, however, a String representation   * of it is.  Users of LogRecords should generally call this method over   * getThrown() for the reasons of serialization.   * </p>   *   * @return The Stack Trace for the asscoiated Throwable of this LogRecord.   * @see #setThrown(Throwable)   * @see #getThrown()   */  public String getThrownStackTrace() {    return (_thrownStackTrace);  }  /**   * Set the ThrownStackTrace for the log record.   *   * @param trace A String to associate with this LogRecord   * @see #getThrownStackTrace()   */  public void setThrownStackTrace(String trace) {    _thrownStackTrace = trace;  }  /**   * Get the Throwable associated with this LogRecord.   *   * @return The LogLevel of this record.   * @see #setThrown(Throwable)   * @see #getThrownStackTrace()   */  public Throwable getThrown() {    return (_thrown);  }  /**   * Set the Throwable associated with this LogRecord.  When this method   * is called, the stack trace in a String-based format is made   * available via the getThrownStackTrace() method.   *   * @param thrown A Throwable to associate with this LogRecord.   * @see #getThrown()   * @see #getThrownStackTrace()   */  public void setThrown(Throwable thrown) {    if (thrown == null) {      return;    }    _thrown = thrown;    StringWriter sw = new StringWriter();    PrintWriter out = new PrintWriter(sw);    thrown.printStackTrace(out);    out.flush();    _thrownStackTrace = sw.toString();    try {      out.close();      sw.close();    } catch (IOException e) {      // Do nothing, this should not happen as it is StringWriter.    }    out = null;    sw = null;  }  /**   * Return a String representation of this LogRecord.   */  public String toString() {    StringBuffer buf = new StringBuffer();    buf.append("LogRecord: [" + _level + ", " + _message + "]");    return (buf.toString());  }  /**   * Get the NDC (nested diagnostic context) for this record.   *   * @return The string representing the NDC.   */  public String getNDC() {    return _ndc;  }  /**   * Set the NDC (nested diagnostic context) for this record.   *   * @param ndc A string representing the NDC.   */  public void setNDC(String ndc) {    _ndc = ndc;  }  /**   * Get the location in code where this LogRecord originated.   *   * @return The string containing the location information.   */  public String getLocation() {    return _location;  }  /**   * Set the location in code where this LogRecord originated.   *   * @param location A string containing location information.   */  public void setLocation(String location) {    _location = location;  }  /**   * Resets that sequence number to 0.   *   */  public static synchronized void resetSequenceNumber() {    _seqCount = 0;  }  //--------------------------------------------------------------------------  //   Protected Methods:  //--------------------------------------------------------------------------  protected static synchronized long getNextId() {    _seqCount++;    return _seqCount;  }  //--------------------------------------------------------------------------  //   Private Methods:  //--------------------------------------------------------------------------  //--------------------------------------------------------------------------  //   Nested Top-Level Classes or Interfaces:  //--------------------------------------------------------------------------}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人精品电影在线观看| 欧美一区二区三区人| 国产福利一区二区三区视频在线 | 欧美日韩一区高清| 91亚洲精品一区二区乱码| 国产999精品久久| 成人永久免费视频| 成人激情动漫在线观看| 国产不卡在线视频| av亚洲精华国产精华精华| 成人一区在线看| 99久久精品国产一区| 91麻豆蜜桃一区二区三区| 色视频一区二区| 欧美性色黄大片手机版| 欧美巨大另类极品videosbest | 国产欧美中文在线| 中文字幕巨乱亚洲| 亚洲色图欧洲色图| 亚洲影院理伦片| 午夜亚洲福利老司机| 日韩av一级电影| 韩国视频一区二区| a美女胸又www黄视频久久| 色94色欧美sute亚洲线路一久| 欧洲人成人精品| 91精品国产一区二区| 精品国产1区2区3区| 国产视频视频一区| 亚洲免费资源在线播放| 日日夜夜精品免费视频| 精品亚洲porn| 不卡的电影网站| 欧美在线观看视频在线| 日韩一区二区电影| 国产蜜臀av在线一区二区三区| 亚洲男同性恋视频| 蜜臀久久99精品久久久画质超高清| 韩国视频一区二区| 91论坛在线播放| 日韩欧美一区二区三区在线| 国产精品天干天干在观线| 亚洲一二三级电影| 国产美女在线观看一区| 色婷婷精品大视频在线蜜桃视频| 欧美一级在线视频| 一色桃子久久精品亚洲| 日日夜夜免费精品视频| 成人av网站在线| 欧美一区日韩一区| 亚洲欧洲精品一区二区三区不卡| 天天综合天天做天天综合| 国产不卡高清在线观看视频| 欧美日韩一级视频| 中文一区一区三区高中清不卡| 午夜视频一区二区三区| www.久久精品| www久久精品| 天堂av在线一区| 97se亚洲国产综合自在线不卡 | 一区二区三区欧美日| 久久精品国产久精国产| 色综合久久中文字幕综合网| 日韩女优毛片在线| 亚洲午夜久久久久久久久电影院 | 色天使色偷偷av一区二区| 久久久青草青青国产亚洲免观| 亚洲成人免费视| www.综合网.com| 久久综合精品国产一区二区三区 | 在线日韩一区二区| 国产三区在线成人av| 日本va欧美va欧美va精品| 色婷婷综合久久| 国产精品网站一区| 国产一区二区在线视频| 日韩免费视频一区二区| 亚洲成人久久影院| 欧洲一区在线观看| 亚洲美女精品一区| 成人毛片在线观看| 久久亚洲精华国产精华液 | 国产一区不卡视频| 日韩欧美亚洲国产另类| 亚洲大片在线观看| 色国产综合视频| 亚洲日本一区二区| 9久草视频在线视频精品| 亚洲国产高清在线| 国产精品影视网| 欧美精品一区二区三区蜜桃| 蜜臀av性久久久久蜜臀aⅴ| 欧美色中文字幕| 亚洲一区在线观看视频| 日本福利一区二区| 亚洲男人的天堂一区二区| 一本久道久久综合中文字幕| 中文字幕中文在线不卡住| www.亚洲免费av| 国产精品婷婷午夜在线观看| 国产成人av一区二区| 国产性天天综合网| 国产成人在线网站| 国产亚洲欧美激情| 成人污污视频在线观看| 国产精品久久久久精k8| av在线不卡电影| 亚洲精品菠萝久久久久久久| 一本到一区二区三区| 亚洲永久精品大片| 91麻豆精品国产91久久久久| 日韩精品免费专区| 精品国产乱码久久久久久影片| 精品系列免费在线观看| 久久免费偷拍视频| 成人国产视频在线观看| 中文字幕在线不卡国产视频| 不卡的看片网站| 亚洲国产毛片aaaaa无费看| 欧美精品日韩精品| 麻豆成人免费电影| 久久精品亚洲国产奇米99| av在线不卡观看免费观看| 一区二区三区四区在线| 欧美日免费三级在线| 蜜臀久久久99精品久久久久久| 2021久久国产精品不只是精品| heyzo一本久久综合| 亚洲精品国产高清久久伦理二区| 欧美日韩精品免费| 久久99精品久久久久婷婷| 国产性色一区二区| 在线看一区二区| 六月丁香婷婷色狠狠久久| 久久久久88色偷偷免费| 色综合久久综合中文综合网| 日韩高清不卡在线| 国产欧美日韩在线看| 91成人在线精品| 精品一区二区免费| 最新日韩在线视频| 欧美一区二区成人| kk眼镜猥琐国模调教系列一区二区 | ...中文天堂在线一区| 欧美精品久久99| 国产福利91精品一区二区三区| 一区二区三区视频在线看| 日韩精品一区二区三区四区| 成人爱爱电影网址| 日本欧美一区二区| 中文字幕一区二区三区在线播放| 欧美日韩视频在线一区二区| 国产成人综合亚洲91猫咪| 亚洲福利一二三区| 国产拍揄自揄精品视频麻豆| 欧美日韩黄色一区二区| 国产宾馆实践打屁股91| 亚洲第一激情av| 国产精品久久久久一区二区三区 | www.日韩大片| 精品综合久久久久久8888| 亚洲欧美国产毛片在线| 欧美成人r级一区二区三区| 91在线视频观看| 国内精品国产成人| 亚洲第一主播视频| 国产精品久久福利| 精品国产乱码久久久久久久| 欧美亚洲综合在线| 成人午夜免费电影| 韩国av一区二区三区在线观看| 亚洲高清不卡在线观看| 亚洲欧洲av一区二区三区久久| 精品久久人人做人人爱| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 国产乱对白刺激视频不卡| 亚洲成人激情自拍| 国产精品久久久久桃色tv| 亚洲精品一区二区三区影院| 欧美日韩精品一区二区三区四区| 丁香六月综合激情| 国内国产精品久久| 麻豆精品蜜桃视频网站| 日韩高清在线不卡| 亚洲18女电影在线观看| 亚洲人成网站影音先锋播放| 国产情人综合久久777777| 精品少妇一区二区三区在线播放| 欧美精品乱码久久久久久| 91电影在线观看| 色噜噜狠狠色综合中国| av网站一区二区三区| 国产麻豆精品久久一二三| 久久精品国产**网站演员| 日本不卡在线视频| 日韩精品一级二级| 丝袜美腿高跟呻吟高潮一区| 夜夜精品视频一区二区| 亚洲丝袜精品丝袜在线| 中文字幕va一区二区三区|